mirror of
				https://github.com/capistrano/capistrano
				synced 2023-03-27 23:21:18 -04:00 
			
		
		
		
	git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@6288 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
		
			
				
	
	
		
			53 lines
		
	
	
		
			No EOL
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			53 lines
		
	
	
		
			No EOL
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Ruby
		
	
	
	
	
	
require 'rake'
 | 
						|
require 'rake/testtask'
 | 
						|
require 'rake/rdoctask'
 | 
						|
require 'rake/packagetask'
 | 
						|
require 'rake/gempackagetask'
 | 
						|
require 'rake/contrib/rubyforgepublisher'
 | 
						|
 | 
						|
require "./lib/capistrano/version"
 | 
						|
 | 
						|
PKG_NAME      = "capistrano"
 | 
						|
PKG_BUILD     = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
 | 
						|
PKG_VERSION   = Capistrano::Version::STRING + PKG_BUILD
 | 
						|
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
 | 
						|
 | 
						|
desc "Default task"
 | 
						|
task :default => [ :test ]
 | 
						|
 | 
						|
desc "Build documentation"
 | 
						|
task :doc => [ :rdoc ]
 | 
						|
 | 
						|
Rake::TestTask.new do |t|
 | 
						|
  t.test_files = Dir["test/**/*_test.rb"]
 | 
						|
  t.verbose = true
 | 
						|
end
 | 
						|
 | 
						|
GEM_SPEC = eval(File.read("#{File.dirname(__FILE__)}/#{PKG_NAME}.gemspec"))
 | 
						|
 | 
						|
Rake::GemPackageTask.new(GEM_SPEC) do |p|
 | 
						|
  p.gem_spec = GEM_SPEC
 | 
						|
  p.need_tar = true
 | 
						|
  p.need_zip = true
 | 
						|
end
 | 
						|
 | 
						|
desc "Build the RDoc API documentation"
 | 
						|
Rake::RDocTask.new do |rdoc|
 | 
						|
  rdoc.rdoc_dir = "doc"
 | 
						|
  rdoc.title    = "Capistrano -- A framework for remote command execution"
 | 
						|
  rdoc.options << '--line-numbers --inline-source --main README'
 | 
						|
  rdoc.rdoc_files.include 'README'
 | 
						|
  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
 | 
						|
 | 
						|
desc "Clean up generated directories and files"
 | 
						|
task :clean do
 | 
						|
  rm_rf "pkg"
 | 
						|
end |