1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

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

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