public
Rubygem
Description: Apache Buildr
Homepage: http://incubator.apache.org/buildr
Clone URL: git://github.com/vic/buildr.git
Search Repo:
Fixes to get the release working.


git-svn-id: https://svn.apache.org/repos/asf/incubator/buildr/trunk@652684 
13f79535-47bb-0310-9956-ffa450edef68
Assaf (author)
Thu May 01 15:00:53 -0700 2008
commit  5f79ec47a19cadd0254c5008e4cbf3bbb44d114d
tree    27d7ef16bc23f1391b569280a27b1accedc31ebb
parent  6c9f386b4d0d0e5d8d3c01874fc1ecd287b4651e
...
65
66
67
68
 
 
 
 
69
70
71
...
109
110
111
112
 
113
114
115
...
65
66
67
 
68
69
70
71
72
73
74
...
112
113
114
 
115
116
117
118
0
@@ -65,7 +65,10 @@
0
     target = args.incubating ? "people.apache.org:/www/www.apache.org/dist/incubator/#{spec.name}/#{spec.version}-incubating" :
0
       "people.apache.org:/www/www.apache.org/dist/#{spec.name}/#{spec.version}"
0
     puts 'Uploading packages to Apache distro ...'
0
- sh 'rsync', '--progress', 'published/distro/*', target
0
+ host, remote_dir = target.split(':')
0
+ sh 'ssh', host, 'rm', '-rf', remote_dir rescue nil
0
+ sh 'ssh', host, 'mkdir', remote_dir
0
+ sh 'rsync', '--progress', '--recursive', 'published/distro/', target
0
     puts 'Done'
0
   end
0
 
0
@@ -109,7 +112,7 @@
0
     target = args.incubating ? "people.apache.org:/www/incubator.apache.org/#{spec.name}" :
0
       "people.apache.org:/www/#{spec.name}.apache.org"
0
     puts 'Uploading Apache Web site ...'
0
- sh 'rsync', '--progress', '--recursive', '--delete', 'published/distro/site/', target
0
+ sh 'rsync', '--progress', '--recursive', '--delete', 'published//site/', target
0
     puts 'Done'
0
   end
0
 
...
40
41
42
43
 
 
44
45
46
...
40
41
42
 
43
44
45
46
47
0
@@ -40,7 +40,8 @@
0
   end
0
 
0
   task 'wrapup'=>'CHANGELOG' do
0
- next_version = spec.version.to_ints.zip([0, 0, 1]).map { |a| a.inject(0) { |t,i| t + i } }.join('.')
0
+ next_version = spec.version.to_s.split('.').map { |v| v.to_i }.
0
+ zip([0, 0, 1]).map { |a| a.inject(0) { |t,i| t + i } }.join('.')
0
     print 'Adding new entry to CHANGELOG ... '
0
     modified = "#{next_version} (Pending)\n\n" + File.read('CHANGELOG')
0
     File.open 'CHANGELOG', 'w' do |file|
...
40
41
42
43
 
 
44
45
46
...
40
41
42
 
43
44
45
46
47
0
@@ -40,7 +40,8 @@
0
 task 'next_version' do
0
   ver_file = "lib/#{spec.name}.rb"
0
   if File.exist?(ver_file)
0
- next_version = spec.version.to_ints.zip([0, 0, 1]).map { |a| a.inject(0) { |t,i| t + i } }.join('.')
0
+ next_version = spec.version.to_s.split('.').map { |v| v.to_i }.
0
+ zip([0, 0, 1]).map { |a| a.inject(0) { |t,i| t + i } }.join('.')
0
     print "Updating #{ver_file} to next version number (#{next_version}) ... "
0
     modified = File.read(ver_file).sub(/(VERSION\s*=\s*)(['"])(.*)\2/) { |line| "#{$1}#{$2}#{next_version}#{$2}" }
0
     File.open ver_file, 'w' do |file|
...
29
30
31
32
 
 
 
 
 
 
 
 
33
34
 
35
36
37
38
39
 
40
41
42
...
29
30
31
 
32
33
34
35
36
37
38
39
40
 
41
42
43
44
45
 
46
47
48
49
0
@@ -29,14 +29,21 @@
0
 
0
 namespace 'rubyforge' do
0
 
0
- task 'release'=>'published' do |task|
0
+ file 'published/rubyforge'=>'published' do
0
+ mkdir 'published/rubyforge'
0
+ FileList['published/distro/*.{gem,tgz,zip}'].each do |pkg|
0
+ cp pkg, 'published/rubyforge/' + File.basename(pkg).sub(/-incubating/, '')
0
+ end
0
+ end
0
+
0
+ task 'release'=>'published/rubyforge' do |task|
0
     changes = FileList['published/CHANGES'].first
0
- files = FileList['published//*.{gem,tgz,zip}'].exclude(changes).existing
0
+ files = FileList['published/rubyforge/*.{gem,tgz,zip}'].exclude(changes).existing
0
     print "Uploading #{spec.version} to RubyForge ... "
0
     rubyforge = RubyForge.new
0
     rubyforge.login
0
     rubyforge.userconfig.merge!('release_changes'=>changes, 'preformatted' => true) if changes
0
- rubyforge.add_release spec.rubyforge_project.downcase, spec.name.downcase, spec.version, *files
0
+ rubyforge.add_release spec.rubyforge_project.downcase, spec.name.downcase, spec.version.to_s, *files
0
     puts 'Done'
0
   end
0
 

Comments

    No one has commented yet.