Skip to content

Commit

Permalink
Remove cruft in the gem packaging and release code
Browse files Browse the repository at this point in the history
  • Loading branch information
brynary authored and jeremy committed Mar 2, 2010
1 parent 8bb162f commit 11db694
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 143 deletions.
14 changes: 6 additions & 8 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ require 'rake'
require 'rake/rdoctask'
require 'rake/gempackagetask'

env = %(PKG_BUILD="#{ENV['PKG_BUILD']}") if ENV['PKG_BUILD']

PROJECTS = %w(activesupport activemodel actionpack actionmailer activeresource activerecord railties)

Dir["#{File.dirname(__FILE__)}/*/lib/*/version.rb"].each do |version_path|
Expand All @@ -13,12 +11,12 @@ end
desc 'Run all tests by default'
task :default => %w(test test:isolated)

%w(test test:isolated rdoc pgem package gem gemspec).each do |task_name|
%w(test test:isolated rdoc package gem).each do |task_name|
desc "Run #{task_name} task for all projects"
task task_name do
errors = []
PROJECTS.each do |project|
system(%(cd #{project} && #{env} #{$0} #{task_name})) || errors << project
system(%(cd #{project} && #{$0} #{task_name})) || errors << project
end
fail("Errors in #{errors.join(', ')}") unless errors.empty?
end
Expand All @@ -27,9 +25,9 @@ end
desc "Smoke-test all projects"
task :smoke do
(PROJECTS - %w(activerecord)).each do |project|
system %(cd #{project} && #{env} #{$0} test:isolated)
system %(cd #{project} && #{$0} test:isolated)
end
system %(cd activerecord && #{env} #{$0} sqlite3:isolated_test)
system %(cd activerecord && #{$0} sqlite3:isolated_test)
end

spec = eval(File.read('rails.gemspec'))
Expand All @@ -48,7 +46,7 @@ desc "Release all components to gemcutter."
task :release_projects => :package do
errors = []
PROJECTS.each do |project|
system(%(cd #{project} && #{env} #{$0} release)) || errors << project
system(%(cd #{project} && #{$0} release)) || errors << project
end
fail("Errors in #{errors.join(', ')}") unless errors.empty?
end
Expand Down Expand Up @@ -122,6 +120,6 @@ task :pdoc => :rdoc do
require 'rake/contrib/sshpublisher'
Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/api", "doc/rdoc").upload
PROJECTS.each do |project|
system %(cd #{project} && #{env} #{$0} pdoc)
system %(cd #{project} && #{$0} pdoc)
end
end
10 changes: 0 additions & 10 deletions actionmailer/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@ require 'rake/packagetask'
require 'rake/gempackagetask'
require File.join(File.dirname(__FILE__), 'lib', 'action_mailer', 'version')

PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
PKG_NAME = 'actionmailer'
PKG_VERSION = ActionMailer::VERSION::STRING + PKG_BUILD
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"

RELEASE_NAME = "REL #{PKG_VERSION}"

RUBY_FORGE_PROJECT = "actionmailer"
RUBY_FORGE_USER = "webster132"

desc "Default Task"
task :default => [ :test ]

Expand Down
31 changes: 1 addition & 30 deletions actionpack/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@ require 'rake/packagetask'
require 'rake/gempackagetask'
require File.join(File.dirname(__FILE__), 'lib', 'action_pack', 'version')

PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
PKG_NAME = 'actionpack'
PKG_VERSION = ActionPack::VERSION::STRING + PKG_BUILD
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"

RELEASE_NAME = "REL #{PKG_VERSION}"

RUBY_FORGE_PROJECT = "actionpack"
RUBY_FORGE_USER = "webster132"

desc "Default Task"
task :default => :test

Expand Down Expand Up @@ -114,27 +104,8 @@ task :update_js => [ :update_scriptaculous ]

# Publishing ------------------------------------------------------

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

desc "Publish the API documentation"
task :pdoc => [:rdoc] do
require 'rake/contrib/sshpublisher'
Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/ap", "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
end
7 changes: 0 additions & 7 deletions activemodel/Rakefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
dir = File.dirname(__FILE__)
require "#{dir}/lib/active_model/version"

PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
PKG_NAME = 'activemodel'
PKG_VERSION = ActiveModel::VERSION::STRING + PKG_BUILD
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
RELEASE_NAME = "REL #{PKG_VERSION}"


require 'rake/testtask'

task :default => :test
Expand Down
14 changes: 0 additions & 14 deletions activerecord/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,8 @@ require 'rake/gempackagetask'
require File.join(File.dirname(__FILE__), 'lib', 'active_record', 'version')
require File.expand_path(File.dirname(__FILE__)) + "/test/config"

PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
PKG_NAME = 'activerecord'
PKG_VERSION = ActiveRecord::VERSION::STRING + PKG_BUILD
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"

RELEASE_NAME = "REL #{PKG_VERSION}"

RUBY_FORGE_PROJECT = "activerecord"
RUBY_FORGE_USER = "webster132"

MYSQL_DB_USER = 'rails'

PKG_FILES = FileList[
"lib/**/*", "test/**/*", "examples/**/*", "doc/**/*", "[A-Z]*", "install.rb", "Rakefile"
].exclude(/\bCVS\b|~$/)

def run_without_aborting(*tasks)
errors = []

Expand Down
14 changes: 0 additions & 14 deletions activeresource/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,6 @@ require 'rake/gempackagetask'

require File.join(File.dirname(__FILE__), 'lib', 'active_resource', 'version')

PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
PKG_NAME = 'activeresource'
PKG_VERSION = ActiveResource::VERSION::STRING + PKG_BUILD
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"

RELEASE_NAME = "REL #{PKG_VERSION}"

RUBY_FORGE_PROJECT = "activerecord"
RUBY_FORGE_USER = "webster132"

PKG_FILES = FileList[
"lib/**/*", "test/**/*", "[A-Z]*", "Rakefile"
].exclude(/\bCVS\b|~$/)

desc "Default Task"
task :default => [ :test ]

Expand Down
10 changes: 0 additions & 10 deletions activesupport/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@ require 'rake/gempackagetask'

require File.join(File.dirname(__FILE__), 'lib', 'active_support', 'version')

PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
PKG_NAME = 'activesupport'
PKG_VERSION = ActiveSupport::VERSION::STRING + PKG_BUILD
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"

RELEASE_NAME = "REL #{PKG_VERSION}"

RUBY_FORGE_PROJECT = "activesupport"
RUBY_FORGE_USER = "webster132"

task :default => :test
Rake::TestTask.new do |t|
t.libs << 'test'
Expand Down
14 changes: 0 additions & 14 deletions pushgems.rb

This file was deleted.

11 changes: 0 additions & 11 deletions railties/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,6 @@ require 'rbconfig'
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/lib"
require 'rails/version'

PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
PKG_NAME = 'railties'
PKG_VERSION = Rails::VERSION::STRING + PKG_BUILD
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
PKG_DESTINATION = ENV["RAILS_PKG_DESTINATION"] || "../#{PKG_NAME}"

RELEASE_NAME = "REL #{PKG_VERSION}"

RUBY_FORGE_PROJECT = "rails"
RUBY_FORGE_USER = "webster132"

task :default => :test
task :test => 'test:isolated'

Expand Down
25 changes: 0 additions & 25 deletions release.rb

This file was deleted.

0 comments on commit 11db694

Please sign in to comment.