Permalink
Browse files

Made SwitchTower conform to the other Rakefiles in terms of PKG descr…

…iption and beta gems pushing

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2045 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent c5ff810 commit 6a4d4460ea2569d3bb54e1e75fad945c361cbc9b @dhh dhh committed Aug 24, 2005
Showing with 16 additions and 6 deletions.
  1. +2 −2 pushgems.rb
  2. +1 −0 railties/Rakefile
  3. +12 −3 switchtower/Rakefile
  4. +1 −1 switchtower/switchtower.gemspec
View
@@ -1,10 +1,10 @@
#!/usr/local/bin/ruby
unless ARGV.first == "no_build"
- build_number = `svn log -q -rhead http://dev.rubyonrails.org/svn/rails`.scan(/r([0-9]*)/).first.first.to_i
+ build_number = "1962"
end
-%w( actionwebservice actionmailer actionpack activerecord railties activesupport).each do |pkg|
+%w( actionwebservice actionmailer actionpack activerecord railties activesupport switchtower ).each do |pkg|
puts "Pushing: #{pkg} (#{build_number})"
if build_number
`cd #{pkg} && rm -rf pkg && PKG_BUILD=#{build_number} rake pgem && cd ..`
View
@@ -267,6 +267,7 @@ spec = Gem::Specification.new do |s|
s.add_dependency('actionpack', '= 1.9.1' + PKG_BUILD)
s.add_dependency('actionmailer', '= 1.0.1' + PKG_BUILD)
s.add_dependency('actionwebservice', '= 0.8.1' + PKG_BUILD)
+ s.add_dependency('switchtower', '= 0.8.0' + PKG_BUILD)
s.rdoc_options << '--exclude' << '.'
s.has_rdoc = false
View
@@ -2,11 +2,14 @@ require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/gempackagetask'
+require 'rake/contrib/rubyforgepublisher'
require "./lib/switchtower/version"
-SOFTWARE_NAME = "switchtower"
-SOFTWARE_VERSION = SwitchTower::Version::STRING
+PKG_NAME = "switchtower"
+PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
+PKG_VERSION = SwitchTower::Version::STRING + PKG_BUILD
+PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
desc "Default task"
task :default => [ :test ]
@@ -19,7 +22,7 @@ Rake::TestTask.new do |t|
t.verbose = true
end
-GEM_SPEC = eval(File.read("#{File.dirname(__FILE__)}/#{SOFTWARE_NAME}.gemspec"))
+GEM_SPEC = eval(File.read("#{File.dirname(__FILE__)}/#{PKG_NAME}.gemspec"))
Rake::GemPackageTask.new(GEM_SPEC) do |p|
p.gem_spec = GEM_SPEC
@@ -36,3 +39,9 @@ Rake::RDocTask.new do |rdoc|
rdoc.rdoc_files.include 'lib/**/*.rb'
rdoc.template = "jamis"
end
+
+desc "Publish the beta gem"
+task :pgem => [:package] do
+ Rake::SshFilePublisher.new("davidhh@wrath.rubyonrails.org", "public_html/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
+ `ssh davidhh@wrath.rubyonrails.org './gemupdate.sh'`
+end
@@ -3,7 +3,7 @@ require './lib/switchtower/version'
Gem::Specification.new do |s|
s.name = 'switchtower'
- s.version = SwitchTower::Version::STRING
+ s.version = PKG_VERSION
s.platform = Gem::Platform::RUBY
s.summary = <<-DESC.strip.gsub(/\n/, " ")
SwitchTower is a framework and utility for executing commands in parallel

0 comments on commit 6a4d446

Please sign in to comment.