6 # 1) rake git:pull spec and make sure everything is clean.
7 # 2) if needed, update the version in rakelib/configuration.rb
8 # commit, and rake git:safe_push.
9 # 3) rake release VERSION="X.Y.Z"
10 # 1) It packages up a tarball from HEAD on your master in cwd.
11 # 2) It tags HEAD on master with "vX.Y.Z", but is not pushed up.
12 # 4) double check the tarball - send out to osx, linux, and bsd for testing.
17 require 'rakelib/configuration'
19 desc "Perform a release"
20 task :release => %w(release:package release:tag)
25 # TODO auto-commit CONTRIBUTORS file
26 desc "Generate CONTRIBUTORS file"
28 sh "git log | grep Author | sort --unique | sed -e 's/Author: //' > CONTRIBUTORS"
31 desc "Print release steps"
33 help = File.read(__FILE__).split(/\n\n+/)[1]
35 puts help.gsub(/^\#+ ?/, '')
39 desc "Build a package from the git repo"
42 abort "you need to specify VERSION=x.y.z" unless ver
45 name = "rubinius-#{ver}"
48 sh "git archive --format=tar --prefix=#{name}/ HEAD | gzip -9>#{name}.tgz"
52 desc "Build a package from the git repo"
55 abort "you need to specify VERSION=x.y.z" unless ver
61 # TODO: we _may_ want to switch from -a to -s for signed tarballs... maybe
62 sh "git tag -a -m 'Tagging #{name} for release' #{name}"
63 sh "git tag -l #{name}"
68 def verify_version expected
70 unless expected == actual
71 abort "version #{expected} doesn't match #{actual}. Run `rake release:help`"