From 6930b282cc844407a645ca39c22a2aa28621e829 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Fri, 20 Jul 2007 00:14:16 +0000 Subject: [PATCH] r1587: Adding the release preparation script --- docs/package.rb | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 docs/package.rb diff --git a/docs/package.rb b/docs/package.rb new file mode 100755 index 0000000..6164858 --- /dev/null +++ b/docs/package.rb @@ -0,0 +1,55 @@ +#!/usr/bin/ruby + +require 'FileUtils' + +puts "" +puts "====================================================" +puts "Bugdar Release Preparation System $Revision$" +puts "====================================================" +puts "" + +puts "What is the human-readable version of Bugdar that you are releasing?" +versionhr = gets.chomp +versionfs = versionhr.gsub(/\./, "-") + +puts "" + +puts "Where should I export Subversion from?" +svnpath = gets.chomp + +puts "" + +puts "Preparing the release now..." + +# create the directory +puts "... making release directory" +pwd = FileUtils.pwd + "/" +dirpath = "bugdar-" + versionfs +FileUtils.mkdir(dirpath) +FileUtils.cd(pwd + dirpath) + +# export subversion +puts "... exporting subversion" +system "svn export -q --non-interactive " + svnpath + " upload/" + +# remove temp directories +puts "... cleaning SVN export" +FileUtils.rm_rf("upload/docs/") +FileUtils.rm_rf("upload/framework/dev/") + +# move good files up +puts "... preparing main files" +FileUtils.mv("upload/INSTALLING", ".") +FileUtils.mv("upload/UPGRADING", ".") +FileUtils.mv("upload/CREDITS", ".") + +# tar and zip the files +FileUtils.cd("..") +system "zip -rq bugdar-" + versionfs + ".zip " + dirpath +puts "... creating ZIP file" +system "tar czf bugdar-" + versionfs + ".tgz " + dirpath +puts "... creating TAR file" + +# cleanup +FileUtils.rm_rf(dirpath) +puts "Finished!" \ No newline at end of file -- 2.43.5