Make the install and release Rake tasks visible.

This commit is contained in:
Nathan Weizenbaum 2008-06-22 00:05:22 -04:00
parent f5765c81ed
commit 59f5b54449
1 changed files with 2 additions and 0 deletions

View File

@ -57,11 +57,13 @@ Rake::Task[:package].prerequisites.insert(0, :revision_file)
# We also need to get rid of this file after packaging.
at_exit { File.delete('REVISION') rescue nil }
desc "Install Haml as a gem."
task :install => [:package] do
sudo = RUBY_PLATFORM =~ /win32/ ? '' : 'sudo'
sh %{#{sudo} gem install --no-ri pkg/haml-#{File.read('VERSION').strip}}
end
desc "Release a new Haml package to Rubyforge. Requires the NAME and VERSION flags."
task :release => [:package] do
name, version = ENV['NAME'], ENV['VERSION']
raise "Must supply NAME and VERSION for release task." unless name && version