Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

root/tags/capistrano_1-4-1/Rakefile

Revision 4569, 1.4 kB (checked in by minam, 2 years ago)

Add :clean task, and bump capistrano version

Line 
1 require 'rake'
2 require 'rake/testtask'
3 require 'rake/rdoctask'
4 require 'rake/packagetask'
5 require 'rake/gempackagetask'
6 require 'rake/contrib/rubyforgepublisher'
7
8 require "./lib/capistrano/version"
9
10 PKG_NAME      = "capistrano"
11 PKG_BUILD     = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
12 PKG_VERSION   = Capistrano::Version::STRING + PKG_BUILD
13 PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
14
15 desc "Default task"
16 task :default => [ :test ]
17
18 desc "Build documentation"
19 task :doc => [ :rdoc ]
20
21 Rake::TestTask.new do |t|
22   t.ruby_opts << "-rubygems"
23   t.test_files = Dir["test/**/*_test.rb"]
24   t.verbose = true
25 end
26
27 GEM_SPEC = eval(File.read("#{File.dirname(__FILE__)}/#{PKG_NAME}.gemspec"))
28
29 Rake::GemPackageTask.new(GEM_SPEC) do |p|
30   p.gem_spec = GEM_SPEC
31   p.need_tar = true
32   p.need_zip = true
33 end
34
35 desc "Build the RDoc API documentation"
36 Rake::RDocTask.new do |rdoc|
37   rdoc.rdoc_dir = "doc"
38   rdoc.title    = "Capistrano -- A framework for remote command execution"
39   rdoc.options << '--line-numbers --inline-source --main README'
40   rdoc.rdoc_files.include 'README'
41   rdoc.rdoc_files.include 'lib/**/*.rb'
42   rdoc.template = "jamis"
43 end
44
45 desc "Publish the beta gem"
46 task :pgem => [:package] do
47   Rake::SshFilePublisher.new("davidhh@wrath.rubyonrails.org", "public_html/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
48   `ssh davidhh@wrath.rubyonrails.org './gemupdate.sh'`
49 end
50
51 desc "Clean up generated directories and files"
52 task :clean do
53   rm_rf "pkg"
54 end
Note: See TracBrowser for help on using the browser.