Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (21 sloc) 0.768 kb
desc 'Package gems and upload to RubyGems'
task :release, [:version] => [:package] do |t, args|
args.with_defaults(:version => "")
ver = args.version
fail "no GEM_SPEC is found or defined. 'release' task cannot work without it." unless defined?(GEM_SPEC)
# compare versions to avoid mistakes
unless ver == GEM_SPEC.version.to_s then
fail "Version mismatch (supplied and specification versions differ)."
end
files = FileList["pkg/#{GEM_SPEC.name}-#{GEM_SPEC.version}*.*"].to_a
fail "No files found for the release." if files.empty?
puts "Files to release:"
files.each do |f|
puts " * #{f}"
end
puts "Releasing #{GEM_SPEC.name} version #{GEM_SPEC.version}..."
files.each do |f|
system "gem push #{f}"
end
puts "Done."
end
Jump to Line
Something went wrong with that request. Please try again.