Skip to content

Commit

Permalink
Added some tasks to rake file for rubyforge.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnunemaker committed Apr 21, 2009
1 parent ba5b3b2 commit 59c65b7
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,41 @@ end


task :default => :test

begin
require 'rake/contrib/sshpublisher'
namespace :rubyforge do

desc "Release gem and RDoc documentation to RubyForge"
task :release => ["rubyforge:release:gem", "rubyforge:release:website", "rubyforge:release:docs"]

namespace :release do
desc "Publish RDoc to RubyForge."
task :docs => [:rdoc] do
config = YAML.load(
File.read(File.expand_path('~/.rubyforge/user-config.yml'))
)

host = "#{config['username']}@rubyforge.org"
remote_dir = "/var/www/gforge-projects/crack/rdoc"
local_dir = 'rdoc'

Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
end

task :website do
config = YAML.load(
File.read(File.expand_path('~/.rubyforge/user-config.yml'))
)

host = "#{config['username']}@rubyforge.org"
remote_dir = "/var/www/gforge-projects/crack/"
local_dir = 'website'

Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
end
end
end
rescue LoadError
puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
end

0 comments on commit 59c65b7

Please sign in to comment.