Skip to content
This repository
Browse code

Remove cruft in the gem packaging and release code

  • Loading branch information...
commit 11db694e0b825e3077e7545b08c1bf975997021f 1 parent 8bb162f
Bryan Helmkamp authored March 01, 2010 jeremy committed March 01, 2010
14  Rakefile
@@ -2,8 +2,6 @@ require 'rake'
2 2
 require 'rake/rdoctask'
3 3
 require 'rake/gempackagetask'
4 4
 
5  
-env = %(PKG_BUILD="#{ENV['PKG_BUILD']}") if ENV['PKG_BUILD']
6  
-
7 5
 PROJECTS = %w(activesupport activemodel actionpack actionmailer activeresource activerecord railties)
8 6
 
9 7
 Dir["#{File.dirname(__FILE__)}/*/lib/*/version.rb"].each do |version_path|
@@ -13,12 +11,12 @@ end
13 11
 desc 'Run all tests by default'
14 12
 task :default => %w(test test:isolated)
15 13
 
16  
-%w(test test:isolated rdoc pgem package gem gemspec).each do |task_name|
  14
+%w(test test:isolated rdoc package gem).each do |task_name|
17 15
   desc "Run #{task_name} task for all projects"
18 16
   task task_name do
19 17
     errors = []
20 18
     PROJECTS.each do |project|
21  
-      system(%(cd #{project} && #{env} #{$0} #{task_name})) || errors << project
  19
+      system(%(cd #{project} && #{$0} #{task_name})) || errors << project
22 20
     end
23 21
     fail("Errors in #{errors.join(', ')}") unless errors.empty?
24 22
   end
@@ -27,9 +25,9 @@ end
27 25
 desc "Smoke-test all projects"
28 26
 task :smoke do
29 27
   (PROJECTS - %w(activerecord)).each do |project|
30  
-    system %(cd #{project} && #{env} #{$0} test:isolated)
  28
+    system %(cd #{project} && #{$0} test:isolated)
31 29
   end
32  
-  system %(cd activerecord && #{env} #{$0} sqlite3:isolated_test)
  30
+  system %(cd activerecord && #{$0} sqlite3:isolated_test)
33 31
 end
34 32
 
35 33
 spec = eval(File.read('rails.gemspec'))
@@ -48,7 +46,7 @@ desc "Release all components to gemcutter."
48 46
 task :release_projects => :package do
49 47
   errors = []
50 48
   PROJECTS.each do |project|
51  
-    system(%(cd #{project} && #{env} #{$0} release)) || errors << project
  49
+    system(%(cd #{project} && #{$0} release)) || errors << project
52 50
   end
53 51
   fail("Errors in #{errors.join(', ')}") unless errors.empty?
54 52
 end
@@ -122,6 +120,6 @@ task :pdoc => :rdoc do
122 120
   require 'rake/contrib/sshpublisher'
123 121
   Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/api", "doc/rdoc").upload
124 122
   PROJECTS.each do |project|
125  
-    system %(cd #{project} && #{env} #{$0} pdoc)
  123
+    system %(cd #{project} && #{$0} pdoc)
126 124
   end
127 125
 end
10  actionmailer/Rakefile
@@ -6,16 +6,6 @@ require 'rake/packagetask'
6 6
 require 'rake/gempackagetask'
7 7
 require File.join(File.dirname(__FILE__), 'lib', 'action_mailer', 'version')
8 8
 
9  
-PKG_BUILD     = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
10  
-PKG_NAME      = 'actionmailer'
11  
-PKG_VERSION   = ActionMailer::VERSION::STRING + PKG_BUILD
12  
-PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
13  
-
14  
-RELEASE_NAME  = "REL #{PKG_VERSION}"
15  
-
16  
-RUBY_FORGE_PROJECT = "actionmailer"
17  
-RUBY_FORGE_USER    = "webster132"
18  
-
19 9
 desc "Default Task"
20 10
 task :default => [ :test ]
21 11
 
31  actionpack/Rakefile
@@ -6,16 +6,6 @@ require 'rake/packagetask'
6 6
 require 'rake/gempackagetask'
7 7
 require File.join(File.dirname(__FILE__), 'lib', 'action_pack', 'version')
8 8
 
9  
-PKG_BUILD     = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
10  
-PKG_NAME      = 'actionpack'
11  
-PKG_VERSION   = ActionPack::VERSION::STRING + PKG_BUILD
12  
-PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
13  
-
14  
-RELEASE_NAME  = "REL #{PKG_VERSION}"
15  
-
16  
-RUBY_FORGE_PROJECT = "actionpack"
17  
-RUBY_FORGE_USER    = "webster132"
18  
-
19 9
 desc "Default Task"
20 10
 task :default => :test
21 11
 
@@ -115,26 +105,7 @@ task :update_js => [ :update_scriptaculous ]
115 105
 # Publishing ------------------------------------------------------
116 106
 
117 107
 desc "Publish the API documentation"
118  
-task :pgem => [:package] do
119  
-  require 'rake/contrib/sshpublisher'
120  
-  Rake::SshFilePublisher.new("gems.rubyonrails.org", "/u/sites/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
121  
-  `ssh gems.rubyonrails.org '/u/sites/gems/gemupdate.sh'`
122  
-end
123  
-
124  
-desc "Publish the API documentation"
125 108
 task :pdoc => [:rdoc] do
126 109
   require 'rake/contrib/sshpublisher'
127 110
   Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/ap", "doc").upload
128  
-end
129  
-
130  
-desc "Publish the release files to RubyForge."
131  
-task :release => [ :package ] do
132  
-  require 'rubyforge'
133  
-  require 'rake/contrib/rubyforgepublisher'
134  
-
135  
-  packages = %w( gem tgz zip ).collect{ |ext| "pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}" }
136  
-
137  
-  rubyforge = RubyForge.new
138  
-  rubyforge.login
139  
-  rubyforge.add_release(PKG_NAME, PKG_NAME, "REL #{PKG_VERSION}", *packages)
140  
-end
  111
+end
7  activemodel/Rakefile
... ...
@@ -1,13 +1,6 @@
1 1
 dir = File.dirname(__FILE__)
2 2
 require "#{dir}/lib/active_model/version"
3 3
 
4  
-PKG_BUILD     = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
5  
-PKG_NAME      = 'activemodel'
6  
-PKG_VERSION   = ActiveModel::VERSION::STRING + PKG_BUILD
7  
-PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
8  
-RELEASE_NAME  = "REL #{PKG_VERSION}"
9  
-
10  
-
11 4
 require 'rake/testtask'
12 5
 
13 6
 task :default => :test
14  activerecord/Rakefile
@@ -8,22 +8,8 @@ require 'rake/gempackagetask'
8 8
 require File.join(File.dirname(__FILE__), 'lib', 'active_record', 'version')
9 9
 require File.expand_path(File.dirname(__FILE__)) + "/test/config"
10 10
 
11  
-PKG_BUILD     = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
12  
-PKG_NAME      = 'activerecord'
13  
-PKG_VERSION   = ActiveRecord::VERSION::STRING + PKG_BUILD
14  
-PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
15  
-
16  
-RELEASE_NAME  = "REL #{PKG_VERSION}"
17  
-
18  
-RUBY_FORGE_PROJECT = "activerecord"
19  
-RUBY_FORGE_USER    = "webster132"
20  
-
21 11
 MYSQL_DB_USER = 'rails'
22 12
 
23  
-PKG_FILES = FileList[
24  
-    "lib/**/*", "test/**/*", "examples/**/*", "doc/**/*", "[A-Z]*", "install.rb", "Rakefile"
25  
-].exclude(/\bCVS\b|~$/)
26  
-
27 13
 def run_without_aborting(*tasks)
28 14
   errors = []
29 15
 
14  activeresource/Rakefile
@@ -7,20 +7,6 @@ require 'rake/gempackagetask'
7 7
 
8 8
 require File.join(File.dirname(__FILE__), 'lib', 'active_resource', 'version')
9 9
 
10  
-PKG_BUILD     = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
11  
-PKG_NAME      = 'activeresource'
12  
-PKG_VERSION   = ActiveResource::VERSION::STRING + PKG_BUILD
13  
-PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
14  
-
15  
-RELEASE_NAME  = "REL #{PKG_VERSION}"
16  
-
17  
-RUBY_FORGE_PROJECT = "activerecord"
18  
-RUBY_FORGE_USER    = "webster132"
19  
-
20  
-PKG_FILES = FileList[
21  
-    "lib/**/*", "test/**/*", "[A-Z]*", "Rakefile"
22  
-].exclude(/\bCVS\b|~$/)
23  
-
24 10
 desc "Default Task"
25 11
 task :default => [ :test ]
26 12
 
10  activesupport/Rakefile
@@ -4,16 +4,6 @@ require 'rake/gempackagetask'
4 4
 
5 5
 require File.join(File.dirname(__FILE__), 'lib', 'active_support', 'version')
6 6
 
7  
-PKG_BUILD     = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
8  
-PKG_NAME      = 'activesupport'
9  
-PKG_VERSION   = ActiveSupport::VERSION::STRING + PKG_BUILD
10  
-PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
11  
-
12  
-RELEASE_NAME  = "REL #{PKG_VERSION}"
13  
-
14  
-RUBY_FORGE_PROJECT = "activesupport"
15  
-RUBY_FORGE_USER    = "webster132"
16  
-
17 7
 task :default => :test
18 8
 Rake::TestTask.new do |t|
19 9
   t.libs << 'test'
14  pushgems.rb
... ...
@@ -1,14 +0,0 @@
1  
-#!/usr/bin/env ruby
2  
-
3  
-unless ARGV.first == "no_build"
4  
-  build_number = Time.now.strftime("%Y%m%d%H%M%S").to_i
5  
-end
6  
-
7  
-%w( activeresource actionmailer actionpack activerecord railties activesupport ).each do |pkg|
8  
-  puts "Pushing: #{pkg} (#{build_number})"
9  
-  if build_number
10  
-    `cd #{pkg} && rm -rf pkg && PKG_BUILD=#{build_number} rake pgem && cd ..`
11  
-  else
12  
-    `cd #{pkg} && rm -rf pkg && rake pgem && cd ..`
13  
-  end
14  
-end
11  railties/Rakefile
@@ -11,17 +11,6 @@ require 'rbconfig'
11 11
 $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/lib"
12 12
 require 'rails/version'
13 13
 
14  
-PKG_BUILD       = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
15  
-PKG_NAME        = 'railties'
16  
-PKG_VERSION     = Rails::VERSION::STRING + PKG_BUILD
17  
-PKG_FILE_NAME   = "#{PKG_NAME}-#{PKG_VERSION}"
18  
-PKG_DESTINATION = ENV["RAILS_PKG_DESTINATION"] || "../#{PKG_NAME}"
19  
-
20  
-RELEASE_NAME  = "REL #{PKG_VERSION}"
21  
-
22  
-RUBY_FORGE_PROJECT = "rails"
23  
-RUBY_FORGE_USER    = "webster132"
24  
-
25 14
 task :default => :test
26 15
 task :test => 'test:isolated'
27 16
 
25  release.rb
... ...
@@ -1,25 +0,0 @@
1  
-#!/usr/bin/env ruby
2  
-
3  
-VERSION  = ARGV.first
4  
-PACKAGES = %w(activesupport activerecord actionpack actionmailer activeresource)
5  
-
6  
-# Copy source
7  
-`mkdir release`
8  
-(PACKAGES + %w(railties)).each do |p| 
9  
-  `cp -R #{p} release/#{p}`
10  
-end
11  
-
12  
-# Create Rails packages
13  
-`cd release/railties && rake template=jamis package`
14  
-
15  
-# Upload documentation
16  
-`cd release/rails/doc/api && scp -r * davidhh@wrath.rubyonrails.com:public_html/api`
17  
-
18  
-# Upload packages
19  
-(PACKAGES + %w(railties)).each do |p| 
20  
-  `cd release/#{p} && echo "Releasing #{p}" && rake release`
21  
-end
22  
-
23  
-# Upload rails tgz/zip
24  
-`rubyforge add_release rails rails 'REL #{VERSION}' release/rails-#{VERSION}.tgz`
25  
-`rubyforge add_release rails rails 'REL #{VERSION}' release/rails-#{VERSION}.zip`

0 notes on commit 11db694

Please sign in to comment.
Something went wrong with that request. Please try again.