Author: assaf
Date: Wed Oct 8 11:44:39 2008
New Revision: 702963
URL: http://svn.apache.org/viewvc?rev=702963&view=rev
Log:
Automated release vote email, part of staging.
Modified:
incubator/buildr/trunk/rakelib/apache.rake
incubator/buildr/trunk/rakelib/stage.rake
Modified: incubator/buildr/trunk/rakelib/apache.rake
URL:
http://svn.apache.org/viewvc/incubator/buildr/trunk/rakelib/apache.rake?rev=702963&r1=702962&r2=702963&view=diff
==============================================================================
--- incubator/buildr/trunk/rakelib/apache.rake (original)
+++ incubator/buildr/trunk/rakelib/apache.rake Wed Oct 8 11:44:39 2008
@@ -121,7 +121,55 @@
sh 'rsync', '--progress', '--recursive', '--delete', 'published/site/',
target
puts 'Done'
end
+
+
+ file 'release-vote-email.txt'=>'CHANGELOG' do |task|
+ # Need to know who you are on Apache, local user may be different (see
.ssh/config).
+ whoami = `ssh people.apache.org whoami`.strip
+ base_url = "http://people.apache.org/~#{whoami}/buildr/#{spec.version}"
+ # Need changes for this release only.
+ changelog =
File.read('CHANGELOG').scan(/(^(\d+\.\d+(?:\.\d+)?)\s+\(\d{4}-\d{2}-\d{2}\)\s*((:?^[^\n]+\n)*))/)
+ changes = changelog[0][2]
+ previous_version = changelog[1][1]
+ email = <<-EMAIL
+To: [EMAIL PROTECTED]
+Subject: [VOTE] Buildr #{spec.version} release
+
+We're voting on the source distributions available here:
+#{base_url}/distro/
+
+Specifically:
+#{base_url}/distro/buildr-#{spec.version}-incubating.tgz
+#{base_url}/distro/buildr-#{spec.version}-incubating.zip
+
+The documentation generated for this release is available here:
+#{base_url}/site/
+#{base_url}/site/buildr.pdf
+
+The official specification against which this release was tested:
+#{base_url}/site/specs.html
+
+Test coverage report:
+#{base_url}/site/coverage/index.html
+
+
+The following changes were made since #{previous_version}:
+
+#{changes}
+ EMAIL
+ File.open task.name, 'w' do |file|
+ file.write email
+ end
+ puts "Created release vote email template in '#{task.name}':"
+ puts email
+ end
+
+end
+
+task 'clobber' do
+ rm_rf 'snapshot'
+ rm_f 'release-vote-email.txt'
end
@@ -135,7 +183,6 @@
task 'stage' do
task('apache:snapshot').invoke
end
-task 'release:publish'=>['apache:publish:distro', 'apache:publish:site']
-task 'clobber' do
- rm_rf 'snapshot'
-end
\ No newline at end of file
+task 'stage:wrapup'=>'release-vote-email.txt'
+
+task 'release:publish'=>['apache:publish:distro', 'apache:publish:site']
\ No newline at end of file
Modified: incubator/buildr/trunk/rakelib/stage.rake
URL:
http://svn.apache.org/viewvc/incubator/buildr/trunk/rakelib/stage.rake?rev=702963&r1=702962&r2=702963&view=diff
==============================================================================
--- incubator/buildr/trunk/rakelib/stage.rake (original)
+++ incubator/buildr/trunk/rakelib/stage.rake Wed Oct 8 11:44:39 2008
@@ -39,7 +39,10 @@
sh 'rsync', '--progress', '--recursive', 'staged/', args.staging
puts 'Done'
end
+
+ # Put anything that happens post staging here, e.g. release vote email
template.
+ task 'wrapup'
end
desc 'Stage files for the release, upload them to staging server'
-task 'stage'=>['stage:check', 'stage:prepare', 'stage:upload']
+task 'stage'=>['stage:check', 'stage:prepare', 'stage:upload', 'stage:wrapup']