buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject [3/6] git commit: Update release process to remove old releases
Date Mon, 05 May 2014 10:32:23 GMT
Update release process to remove old releases


Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/6fd671f1
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/6fd671f1
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/6fd671f1

Branch: refs/heads/master
Commit: 6fd671f196768268983a89a9e293f6a4ea68a010
Parents: 7db6d0f
Author: Peter Donald <peter@realityforge.org>
Authored: Mon May 5 20:06:29 2014 +1000
Committer: Peter Donald <peter@realityforge.org>
Committed: Mon May 5 20:06:29 2014 +1000

----------------------------------------------------------------------
 rakelib/release.rake | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/6fd671f1/rakelib/release.rake
----------------------------------------------------------------------
diff --git a/rakelib/release.rake b/rakelib/release.rake
index 708d7a2..3d33925 100644
--- a/rakelib/release.rake
+++ b/rakelib/release.rake
@@ -30,11 +30,17 @@ task 'release' => %w{setup-local-site-svn} do
     puts 'Uploading packages to www.apache.org/dist ...'
     host, remote_dir = target.split(':')
     sh 'ssh', host, 'rm', '-rf', remote_dir rescue nil
+    existing_dirs = `ssh #{host} ls #{File.dirname(remote_dir)}`.split
     sh 'ssh', host, 'mkdir', remote_dir
     sh 'rsync', '--progress', '--recursive', '--delete', "_release/#{spec.version}/dist/",
target
     sh 'ssh', 'people.apache.org', 'chmod', '-f', '-R', 'g+w', "#{remote_dir}/*"
     puts '[X] Uploaded packages to www.apache.org/dist'
 
+    puts "[X] Removing existing packages #{existing_dirs.join(', ')}"
+    existing_dirs.each do |dir|
+      sh 'ssh', host, 'rm', '-rf', "#{File.dirname(remote_dir)}/#{dir}" rescue nil
+    end
+
     puts "Uploading new site to #{spec.name}.apache.org ..."
     sh 'rsync', '--progress', '--recursive', '--exclude', '.svn', '--delete', "_release/#{spec.version}/site/",
'site'
     task('publish-site-svn').invoke


Mime
View raw message