Repository: buildr
Updated Branches:
  refs/heads/master c051fe89c -> c9a9fa44e


use lftp task when syncing buildr release


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

Branch: refs/heads/master
Commit: c9a9fa44e896aaabf5dd2098ea94d28c36af88bb
Parents: 22c5f52
Author: Antoine Toulme <anto...@lunar-ocean.com>
Authored: Mon Mar 28 21:17:37 2016 -0700
Committer: Antoine Toulme <anto...@lunar-ocean.com>
Committed: Mon Mar 28 21:27:20 2016 -0700

----------------------------------------------------------------------
 rakelib/release.rake | 25 +++++--------------------
 1 file changed, 5 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/c9a9fa44/rakelib/release.rake
----------------------------------------------------------------------
diff --git a/rakelib/release.rake b/rakelib/release.rake
index 15333eb..91e369f 100644
--- a/rakelib/release.rake
+++ b/rakelib/release.rake
@@ -13,31 +13,16 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
-desc 'Checkout or update dist to local directory'
-task 'setup-local-dist-svn' do
-  if File.exist?('dist')
-    sh 'svn', 'up', 'site'
-    sh 'svn', 'revert', '--recursive', 'dist'
-  else
-    sh 'svn', 'co', 'https://dist.apache.org/repos/dist/release/buildr', 'dist'
-  end
-end
-
-task 'publish-dist-svn' do
-  cd 'dist'
-  sh 'svn', 'add', '--force', '.'
-  cd '..'
-  sh 'svn', 'commit', 'dist', '-m', 'Publish latest release'
-end
-
 desc 'Release the next version of buildr from existing staged repository'
-task 'release' => %w{setup-local-site-svn setup-local-dist-svn} do
+task 'release' do |task, args|
+  user = args.user || ENV['user'] || `whoami`
+  
   # First, we need to get all the staged files from Apache to _release.
   mkpath '_release'
   lambda do
-    url = "people.apache.org:~/public_html/#{spec.name}/#{spec.version}"
+    url = "home.apache.org:~/public_html/#{spec.name}/#{spec.version}"
     puts "Populating _release directory from #{url} ..."
-    sh 'rsync', '--progress', '--recursive', url, '_release'
+    sh "lftp -e \"mirror public_html/#{spec.name}/#{spec.version} 
_release/#{spec.version}; bye\" -u #{user} sftp://home.apache.org"; 
     puts '[X] Staged files are now in _release'
   end.call
 

Reply via email to