Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Release using gemcutter gem:push tasks

  • Loading branch information...
commit c1785f32825431d30a5d826066d37dfb0403cd46 1 parent 31f8a59
Jeremy Kemper jeremy authored
5 Gemfile
View
@@ -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"
14 Rakefile
View
@@ -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}"
23 actionmailer/Rakefile
View
@@ -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
6 actionpack/Rakefile
View
@@ -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
6 activemodel/Rakefile
View
@@ -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']
23 activerecord/Rakefile
View
@@ -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
22 activeresource/Rakefile
View
@@ -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
23 activesupport/Rakefile
View
@@ -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
23 railties/Rakefile
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.