buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject svn commit: r1406356 - /buildr/trunk/rakelib/release.rake
Date Tue, 06 Nov 2012 21:50:16 GMT
Author: donaldp
Date: Tue Nov  6 21:50:16 2012
New Revision: 1406356

URL: http://svn.apache.org/viewvc?rev=1406356&view=rev
Log:
Ensure that the release process 
- bumps the version in the correct version file
- actually generates the release email 

Modified:
    buildr/trunk/rakelib/release.rake

Modified: buildr/trunk/rakelib/release.rake
URL: http://svn.apache.org/viewvc/buildr/trunk/rakelib/release.rake?rev=1406356&r1=1406355&r2=1406356&view=diff
==============================================================================
--- buildr/trunk/rakelib/release.rake (original)
+++ buildr/trunk/rakelib/release.rake Tue Nov  6 21:50:16 2012
@@ -81,13 +81,12 @@ task 'release' do
     puts '[X] Updated CHANGELOG and added entry for next release'
   end.call
 
-
   # Update source files to next release number.
   lambda do
     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('.')
 
-    ver_file = "lib/#{spec.name}.rb"
+    ver_file = "lib/#{spec.name}/version.rb"
     if File.exist?(ver_file)
       modified = File.read(ver_file).sub(/(VERSION\s*=\s*)(['"])(.*)\2/) { |line| "#{$1}#{$2}#{next_version}#{$2}"
}
       File.open ver_file, 'w' do |file|
@@ -95,18 +94,8 @@ task 'release' do
       end
       puts "[X] Updated #{ver_file} to next release"
     end
-
-    spec_file = "#{spec.name}.gemspec"
-    if File.exist?(spec_file)
-      modified = File.read(spec_file).sub(/(s(?:pec)?\.version\s*=\s*)(['"])(.*)\2/) { |line|
"#{$1}#{$2}#{next_version}#{$2}" }
-      File.open spec_file, 'w' do |file|
-        file.write modified
-      end
-      puts "[X] Updated #{spec_file} to next release"
-    end
   end.call
 
-
   # Prepare release announcement email.
   lambda do
     changes = File.read("_release/#{spec.version}/CHANGES")[/.*?\n(.*)/m, 1]
@@ -132,8 +121,7 @@ The Apache Buildr Team
     end
     puts '[X] Created release announce email template in ''announce-email.txt'''
     puts email
-  end
-
+  end.call
 end
 
 task('clobber') { rm_rf '_release' }



Mime
View raw message