diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-02-04 18:28:45 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-02-04 18:28:45 -0800 |
commit | c1785f32825431d30a5d826066d37dfb0403cd46 (patch) | |
tree | e7a0bf9efed0981e7e918bfebef393f02834a31b | |
parent | 31f8a59c16d4a29553e2dbf891c891493fd138c0 (diff) | |
download | rails-c1785f32825431d30a5d826066d37dfb0403cd46.tar.gz rails-c1785f32825431d30a5d826066d37dfb0403cd46.tar.bz2 rails-c1785f32825431d30a5d826066d37dfb0403cd46.zip |
Release using gemcutter gem:push tasks
-rw-r--r-- | Gemfile | 5 | ||||
-rw-r--r-- | Rakefile | 14 | ||||
-rw-r--r-- | actionmailer/Rakefile | 23 | ||||
-rw-r--r-- | actionpack/Rakefile | 6 | ||||
-rwxr-xr-x | activemodel/Rakefile | 6 | ||||
-rw-r--r-- | activerecord/Rakefile | 23 | ||||
-rw-r--r-- | activeresource/Rakefile | 22 | ||||
-rw-r--r-- | activesupport/Rakefile | 23 | ||||
-rw-r--r-- | railties/Rakefile | 23 |
9 files changed, 55 insertions, 90 deletions
@@ -1,5 +1,5 @@ path File.expand_path('..', __FILE__) -source :gemcutter +source 'http://gemcutter.org' gem "rails", "3.0.0.beta" @@ -34,3 +34,6 @@ if ENV['CI'] gem "test-unit", ">= 2.0.5", :require => 'test/unit' end end + +# For releases +gem "rake-gemcutter" @@ -37,6 +37,20 @@ Rake::GemPackageTask.new(spec) do |pkg| pkg.gem_spec = spec end +Rake::Gemcutter::Tasks(spec) + +desc "Release all gems to gemcutter. Package rails, package & push components, then push rails" +task :release => [:package, :release_all, 'gem:push'] + +desc "Release all components to gemcutter." +task :release_all do + errors = [] + PROJECTS.each do |project| + system(%(cd #{project} && #{env} #{$0} release)) || errors << project + end + fail("Errors in #{errors.join(', ')}") unless errors.empty? +end + task :install => :gem do (PROJECTS - ["railties"]).each do |project| puts "INSTALLING #{project}" diff --git a/actionmailer/Rakefile b/actionmailer/Rakefile index 2619d9359e..a1caae97c7 100644 --- a/actionmailer/Rakefile +++ b/actionmailer/Rakefile @@ -4,6 +4,7 @@ require 'rake/testtask' require 'rake/rdoctask' require 'rake/packagetask' require 'rake/gempackagetask' +require 'rake/gemcutter' require File.join(File.dirname(__FILE__), 'lib', 'action_mailer', 'version') PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : '' @@ -54,27 +55,13 @@ Rake::GemPackageTask.new(spec) do |p| p.gem_spec = spec end -desc "Publish the API documentation" -task :pgem => [:package] do - require 'rake/contrib/sshpublisher' - Rake::SshFilePublisher.new("gems.rubyonrails.org", "/u/sites/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload - `ssh gems.rubyonrails.org '/u/sites/gems/gemupdate.sh'` -end +Rake::Gemcutter::Tasks(spec) + +desc "Release to gemcutter" +task :release => [:package, 'gem:push'] desc "Publish the API documentation" task :pdoc => [:rdoc] do require 'rake/contrib/sshpublisher' Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/am", "doc").upload end - -desc "Publish the release files to RubyForge." -task :release => [ :package ] do - require 'rubyforge' - require 'rake/contrib/rubyforgepublisher' - - packages = %w( gem tgz zip ).collect{ |ext| "pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}" } - - rubyforge = RubyForge.new - rubyforge.login - rubyforge.add_release(PKG_NAME, PKG_NAME, "REL #{PKG_VERSION}", *packages) -end diff --git a/actionpack/Rakefile b/actionpack/Rakefile index 863daa4b44..e675e67dc6 100644 --- a/actionpack/Rakefile +++ b/actionpack/Rakefile @@ -4,6 +4,7 @@ require 'rake/testtask' require 'rake/rdoctask' require 'rake/packagetask' require 'rake/gempackagetask' +require 'rake/gemcutter' require File.join(File.dirname(__FILE__), 'lib', 'action_pack', 'version') PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : '' @@ -70,6 +71,11 @@ Rake::GemPackageTask.new(spec) do |p| p.gem_spec = spec end +Rake::Gemcutter::Tasks(spec) + +desc "Release to gemcutter" +task :release => [:package, 'gem:push'] + task :lines do lines, codelines, total_lines, total_codelines = 0, 0, 0, 0 diff --git a/activemodel/Rakefile b/activemodel/Rakefile index f098ce0671..e043a6d69d 100755 --- a/activemodel/Rakefile +++ b/activemodel/Rakefile @@ -44,9 +44,15 @@ end require 'rake/packagetask' require 'rake/gempackagetask' +require 'rake/gemcutter' spec = eval(File.read("#{dir}/activemodel.gemspec")) Rake::GemPackageTask.new(spec) do |p| p.gem_spec = spec end + +Rake::Gemcutter::Tasks(spec) + +desc "Release to gemcutter" +task :release => [:package, 'gem:push'] diff --git a/activerecord/Rakefile b/activerecord/Rakefile index 2511f13fed..ce74beb604 100644 --- a/activerecord/Rakefile +++ b/activerecord/Rakefile @@ -4,6 +4,7 @@ require 'rake/testtask' require 'rake/rdoctask' require 'rake/packagetask' require 'rake/gempackagetask' +require 'rake/gemcutter' require File.join(File.dirname(__FILE__), 'lib', 'active_record', 'version') require File.expand_path(File.dirname(__FILE__)) + "/test/config" @@ -226,27 +227,13 @@ end # Publishing ------------------------------------------------------ -desc "Publish the beta gem" -task :pgem => [:package] do - require 'rake/contrib/sshpublisher' - Rake::SshFilePublisher.new("gems.rubyonrails.org", "/u/sites/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload - `ssh gems.rubyonrails.org '/u/sites/gems/gemupdate.sh'` -end +Rake::Gemcutter::Tasks(spec) + +desc "Release to gemcutter" +task :release => [:package, 'gem:push'] desc "Publish the API documentation" task :pdoc => [:rdoc] do require 'rake/contrib/sshpublisher' Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/ar", "doc").upload end - -desc "Publish the release files to RubyForge." -task :release => [ :package ] do - require 'rubyforge' - require 'rake/contrib/rubyforgepublisher' - - packages = %w( gem tgz zip ).collect{ |ext| "pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}" } - - rubyforge = RubyForge.new - rubyforge.login - rubyforge.add_release(PKG_NAME, PKG_NAME, "REL #{PKG_VERSION}", *packages) -end diff --git a/activeresource/Rakefile b/activeresource/Rakefile index 9fa1f86914..d1bac76517 100644 --- a/activeresource/Rakefile +++ b/activeresource/Rakefile @@ -4,6 +4,7 @@ require 'rake/testtask' require 'rake/rdoctask' require 'rake/packagetask' require 'rake/gempackagetask' +require 'rake/gemcutter' require File.join(File.dirname(__FILE__), 'lib', 'active_resource', 'version') @@ -89,26 +90,13 @@ end # Publishing ------------------------------------------------------ -desc "Publish the beta gem" -task :pgem => [:package] do - require 'rake/contrib/sshpublisher' - Rake::SshFilePublisher.new("gems.rubyonrails.org", "/u/sites/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload - `ssh gems.rubyonrails.org '/u/sites/gems/gemupdate.sh'` -end +Rake::Gemcutter::Tasks(spec) + +desc "Release to gemcutter" +task :release => [:package, 'gem:push'] desc "Publish the API documentation" task :pdoc => [:rdoc] do require 'rake/contrib/sshpublisher' Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/ar", "doc").upload end - -desc "Publish the release files to RubyForge." -task :release => [ :package ] do - `rubyforge login` - - for ext in %w( gem tgz zip ) - release_command = "rubyforge add_release #{PKG_NAME} #{PKG_NAME} 'REL #{PKG_VERSION}' pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}" - puts release_command - system(release_command) - end -end diff --git a/activesupport/Rakefile b/activesupport/Rakefile index 03ab3b2760..059d99d8ff 100644 --- a/activesupport/Rakefile +++ b/activesupport/Rakefile @@ -1,6 +1,7 @@ require 'rake/testtask' require 'rake/rdoctask' require 'rake/gempackagetask' +require 'rake/gemcutter' require File.join(File.dirname(__FILE__), 'lib', 'active_support', 'version') @@ -49,27 +50,13 @@ Rake::GemPackageTask.new(spec) do |p| p.gem_spec = spec end -desc "Publish the beta gem" -task :pgem => [:package] do - require 'rake/contrib/sshpublisher' - Rake::SshFilePublisher.new("gems.rubyonrails.org", "/u/sites/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload - `ssh gems.rubyonrails.org '/u/sites/gems/gemupdate.sh'` -end +Rake::Gemcutter::Tasks(spec) + +desc "Release to gemcutter" +task :release => [:package, 'gem:push'] desc "Publish the API documentation" task :pdoc => [:rdoc] do require 'rake/contrib/sshpublisher' Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/as", "doc").upload end - -desc "Publish the release files to RubyForge." -task :release => [ :package ] do - require 'rubyforge' - require 'rake/contrib/rubyforgepublisher' - - packages = %w( gem tgz zip ).collect{ |ext| "pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}" } - - rubyforge = RubyForge.new - rubyforge.login - rubyforge.add_release(PKG_NAME, PKG_NAME, "REL #{PKG_VERSION}", *packages) -end diff --git a/railties/Rakefile b/railties/Rakefile index ea0b8ef8fb..808e39f887 100644 --- a/railties/Rakefile +++ b/railties/Rakefile @@ -4,6 +4,7 @@ require 'rake' require 'rake/testtask' require 'rake/rdoctask' require 'rake/gempackagetask' +require 'rake/gemcutter' require 'date' require 'rbconfig' @@ -90,12 +91,10 @@ end # Publishing ------------------------------------------------------- -desc "Publish the rails gem" -task :pgem => [:gem] do - require 'rake/contrib/sshpublisher' - Rake::SshFilePublisher.new("gems.rubyonrails.org", "/u/sites/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload - `ssh gems.rubyonrails.org '/u/sites/gems/gemupdate.sh'` -end +Rake::Gemcutter::Tasks(spec) + +desc "Release to gemcutter" +task :release => [:package, 'gem:push'] desc "Publish the guides" task :pguides => :generate_guides do @@ -105,15 +104,3 @@ task :pguides => :generate_guides do Rake::SshFilePublisher.new("web.rubyonrails.org", "/u/sites/guides.rubyonrails.org/public", "pkg", "guides.gz").upload `ssh web.rubyonrails.org 'cd /u/sites/guides.rubyonrails.org/public/ && tar -xvzf guides.gz && mv guides/output/* . && rm -rf guides*'` end - -desc "Publish the release files to RubyForge." -task :release => [ :package ] do - require 'rake/contrib/rubyforgepublisher' - require 'rubyforge' - - packages = %w( gem ).collect{ |ext| "pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}" } - - rubyforge = RubyForge.new - rubyforge.login - rubyforge.add_release(PKG_NAME, PKG_NAME, "REL #{PKG_VERSION}", *packages) -end |