You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by as...@apache.org on 2008/05/02 00:00:54 UTC

svn commit: r652684 - in /incubator/buildr/trunk/rakelib: apache.rake changelog.rake release.rake rubyforge.rake

Author: assaf
Date: Thu May  1 15:00:53 2008
New Revision: 652684

URL: http://svn.apache.org/viewvc?rev=652684&view=rev
Log:
Fixes to get the release working.

Modified:
    incubator/buildr/trunk/rakelib/apache.rake
    incubator/buildr/trunk/rakelib/changelog.rake
    incubator/buildr/trunk/rakelib/release.rake
    incubator/buildr/trunk/rakelib/rubyforge.rake

Modified: incubator/buildr/trunk/rakelib/apache.rake
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/rakelib/apache.rake?rev=652684&r1=652683&r2=652684&view=diff
==============================================================================
--- incubator/buildr/trunk/rakelib/apache.rake (original)
+++ incubator/buildr/trunk/rakelib/apache.rake Thu May  1 15:00:53 2008
@@ -65,7 +65,10 @@
     target = args.incubating ? "people.apache.org:/www/www.apache.org/dist/incubator/#{spec.name}/#{spec.version}-incubating" :
       "people.apache.org:/www/www.apache.org/dist/#{spec.name}/#{spec.version}"
     puts 'Uploading packages to Apache distro ...'
-    sh 'rsync', '--progress', 'published/distro/*', target
+    host, remote_dir = target.split(':')
+    sh 'ssh', host, 'rm', '-rf', remote_dir rescue nil
+    sh 'ssh', host, 'mkdir', remote_dir
+    sh 'rsync', '--progress', '--recursive', 'published/distro/', target
     puts 'Done'
   end
 
@@ -109,7 +112,7 @@
     target = args.incubating ? "people.apache.org:/www/incubator.apache.org/#{spec.name}" :
       "people.apache.org:/www/#{spec.name}.apache.org"
     puts 'Uploading Apache Web site ...'
-    sh 'rsync', '--progress', '--recursive', '--delete', 'published/distro/site/', target
+    sh 'rsync', '--progress', '--recursive', '--delete', 'published/site/', target
     puts 'Done'
   end
 

Modified: incubator/buildr/trunk/rakelib/changelog.rake
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/rakelib/changelog.rake?rev=652684&r1=652683&r2=652684&view=diff
==============================================================================
--- incubator/buildr/trunk/rakelib/changelog.rake (original)
+++ incubator/buildr/trunk/rakelib/changelog.rake Thu May  1 15:00:53 2008
@@ -40,7 +40,8 @@
   end
 
   task 'wrapup'=>'CHANGELOG' do
-    next_version = spec.version.to_ints.zip([0, 0, 1]).map { |a| a.inject(0) { |t,i| t + i } }.join('.')
+    next_version = spec.version.to_s.split('.').map { |v| v.to_i }.
+      zip([0, 0, 1]).map { |a| a.inject(0) { |t,i| t + i } }.join('.')
     print 'Adding new entry to CHANGELOG ... '
     modified = "#{next_version} (Pending)\n\n" + File.read('CHANGELOG')
     File.open 'CHANGELOG', 'w' do |file|

Modified: incubator/buildr/trunk/rakelib/release.rake
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/rakelib/release.rake?rev=652684&r1=652683&r2=652684&view=diff
==============================================================================
--- incubator/buildr/trunk/rakelib/release.rake (original)
+++ incubator/buildr/trunk/rakelib/release.rake Thu May  1 15:00:53 2008
@@ -40,7 +40,8 @@
 task 'next_version' do
   ver_file = "lib/#{spec.name}.rb"
   if File.exist?(ver_file)
-    next_version = spec.version.to_ints.zip([0, 0, 1]).map { |a| a.inject(0) { |t,i| t + i } }.join('.')
+    next_version = spec.version.to_s.split('.').map { |v| v.to_i }.
+      zip([0, 0, 1]).map { |a| a.inject(0) { |t,i| t + i } }.join('.')
     print "Updating #{ver_file} to next version number (#{next_version}) ... "
     modified = File.read(ver_file).sub(/(VERSION\s*=\s*)(['"])(.*)\2/) { |line| "#{$1}#{$2}#{next_version}#{$2}" } 
     File.open ver_file, 'w' do |file|

Modified: incubator/buildr/trunk/rakelib/rubyforge.rake
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/rakelib/rubyforge.rake?rev=652684&r1=652683&r2=652684&view=diff
==============================================================================
--- incubator/buildr/trunk/rakelib/rubyforge.rake (original)
+++ incubator/buildr/trunk/rakelib/rubyforge.rake Thu May  1 15:00:53 2008
@@ -29,14 +29,21 @@
 
 namespace 'rubyforge' do
 
-  task 'release'=>'published' do |task|
+  file 'published/rubyforge'=>'published' do
+    mkdir 'published/rubyforge'
+    FileList['published/distro/*.{gem,tgz,zip}'].each do |pkg|
+      cp pkg, 'published/rubyforge/' + File.basename(pkg).sub(/-incubating/, '')
+    end
+  end
+
+  task 'release'=>'published/rubyforge' do |task|
     changes = FileList['published/CHANGES'].first
-    files = FileList['published/*.{gem,tgz,zip}'].exclude(changes).existing
+    files = FileList['published/rubyforge/*.{gem,tgz,zip}'].exclude(changes).existing
     print "Uploading #{spec.version} to RubyForge ... "
     rubyforge = RubyForge.new
     rubyforge.login 
     rubyforge.userconfig.merge!('release_changes'=>changes,  'preformatted' => true) if changes
-    rubyforge.add_release spec.rubyforge_project.downcase, spec.name.downcase, spec.version, *files
+    rubyforge.add_release spec.rubyforge_project.downcase, spec.name.downcase, spec.version.to_s, *files
     puts 'Done'
   end