Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove cruft in the gem packaging and release code

  • Loading branch information...
commit 11db694e0b825e3077e7545b08c1bf975997021f 1 parent 8bb162f
@brynary brynary authored jeremy committed
View
14 Rakefile
@@ -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|
@@ -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
@@ -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'))
@@ -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
@@ -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
View
10 actionmailer/Rakefile
@@ -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 ]
View
31 actionpack/Rakefile
@@ -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
@@ -115,26 +105,7 @@ 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
View
7 activemodel/Rakefile
@@ -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
View
14 activerecord/Rakefile
@@ -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 = []
View
14 activeresource/Rakefile
@@ -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 ]
View
10 activesupport/Rakefile
@@ -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'
View
14 pushgems.rb
@@ -1,14 +0,0 @@
-#!/usr/bin/env ruby
-
-unless ARGV.first == "no_build"
- build_number = Time.now.strftime("%Y%m%d%H%M%S").to_i
-end
-
-%w( activeresource actionmailer actionpack activerecord railties activesupport ).each do |pkg|
- puts "Pushing: #{pkg} (#{build_number})"
- if build_number
- `cd #{pkg} && rm -rf pkg && PKG_BUILD=#{build_number} rake pgem && cd ..`
- else
- `cd #{pkg} && rm -rf pkg && rake pgem && cd ..`
- end
-end
View
11 railties/Rakefile
@@ -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'
View
25 release.rb
@@ -1,25 +0,0 @@
-#!/usr/bin/env ruby
-
-VERSION = ARGV.first
-PACKAGES = %w(activesupport activerecord actionpack actionmailer activeresource)
-
-# Copy source
-`mkdir release`
-(PACKAGES + %w(railties)).each do |p|
- `cp -R #{p} release/#{p}`
-end
-
-# Create Rails packages
-`cd release/railties && rake template=jamis package`
-
-# Upload documentation
-`cd release/rails/doc/api && scp -r * davidhh@wrath.rubyonrails.com:public_html/api`
-
-# Upload packages
-(PACKAGES + %w(railties)).each do |p|
- `cd release/#{p} && echo "Releasing #{p}" && rake release`
-end
-
-# Upload rails tgz/zip
-`rubyforge add_release rails rails 'REL #{VERSION}' release/rails-#{VERSION}.tgz`
-`rubyforge add_release rails rails 'REL #{VERSION}' release/rails-#{VERSION}.zip`
Please sign in to comment.
Something went wrong with that request. Please try again.