Skip to content

Commit

Permalink
add rake release task
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Apr 7, 2008
1 parent 4ca58bb commit e9814ca
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,33 @@ task :manifest do
end
end

desc 'Package and upload the release to rubyforge.'
task :release do
require 'yaml'
require 'rubyforge'

meta = YAML::load open('.gemified')
version = meta[:version]

v = ENV['VERSION'] or abort "Must supply VERSION=x.y.z"
abort "Version doesn't match #{version}" if v != version

gem = "#{meta[:name]}-#{version}.gem"
project = meta[:rubyforge_project]

rf = RubyForge.new
puts "Logging in to RubyForge"
rf.login

c = rf.userconfig
c['release_notes'] = meta[:summary]
c['release_changes'] = File.read('CHANGELOG').split(/^== .+\n/)[1].strip
c['preformatted'] = true

puts "Releasing #{meta[:name]} #{version}"
rf.add_release project, project, version, gem
end

task :examples do
%x(haml examples/index.haml examples/index.html)
%x(sass examples/pagination.sass examples/pagination.css)
Expand Down

0 comments on commit e9814ca

Please sign in to comment.