Skip to content

Commit

Permalink
Added a release rake task to more fully automate the release process.
Browse files Browse the repository at this point in the history
  • Loading branch information
floehopper committed Feb 1, 2009
1 parent 6242447 commit 93cad01
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Rakefile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -83,10 +83,12 @@ Rake::RDocTask.new('rdoc') do |task|
'lib/mocha/stubbing_error.rb' 'lib/mocha/stubbing_error.rb'
) )
end end
task 'rdoc' => 'examples'
desc "Generate all documentation"
task 'generate_docs' => ['clobber_rdoc', 'rdoc', 'examples', 'agiledox.txt']


desc "Upload RDoc to RubyForge" desc "Upload RDoc to RubyForge"
task 'publish_rdoc' => ['rdoc', 'examples'] do task 'publish_docs' do
require 'rake/contrib/sshpublisher' require 'rake/contrib/sshpublisher'
Rake::SshDirPublisher.new("jamesmead@rubyforge.org", "/var/www/gforge-projects/mocha", "doc").upload Rake::SshDirPublisher.new("jamesmead@rubyforge.org", "/var/www/gforge-projects/mocha", "doc").upload
end end
Expand Down Expand Up @@ -168,7 +170,6 @@ task :update_gemspec do
end end
end end



task 'verify_user' do task 'verify_user' do
raise "RUBYFORGE_USER environment variable not set!" unless ENV['RUBYFORGE_USER'] raise "RUBYFORGE_USER environment variable not set!" unless ENV['RUBYFORGE_USER']
end end
Expand All @@ -178,7 +179,7 @@ task 'verify_password' do
end end


desc "Publish package files on RubyForge." desc "Publish package files on RubyForge."
task 'publish_packages' => ['verify_user', 'verify_password', 'package'] do task 'publish_packages' => ['verify_user', 'verify_password', 'clobber_package', 'package'] do
$:.unshift File.expand_path(File.join(File.dirname(__FILE__), "vendor", "meta_project-0.4.15", "lib")) $:.unshift File.expand_path(File.join(File.dirname(__FILE__), "vendor", "meta_project-0.4.15", "lib"))
require 'meta_project' require 'meta_project'
require 'rake/contrib/xforge' require 'rake/contrib/xforge'
Expand All @@ -197,3 +198,10 @@ task 'publish_packages' => ['verify_user', 'verify_password', 'package'] do
release.release_notes = '' release.release_notes = ''
end end
end end

desc "Do a full release."
task 'release' => ['default', 'generate_docs', 'publish_packages', 'publish_docs', 'update_gemspec'] do
puts
puts "*** Remember to commit newly generated gemspec after release ***"
puts
end

0 comments on commit 93cad01

Please sign in to comment.