Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add rake release task

  • Loading branch information...
commit e9814cae7ee0e8f8aa2d80e0a95c7063034ca619 1 parent 4ca58bb
@mislav authored
Showing with 27 additions and 0 deletions.
  1. +27 −0 Rakefile
View
27 Rakefile
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.