diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-09-21 22:40:16 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-09-21 22:40:16 +0000 |
commit | 663111480d8222763e5f553a71166442ef9990cc (patch) | |
tree | 3b78af89f6f07251ee3c60b2be3bca479e7cdb2f /Rakefile | |
parent | 1370d991d6bbe7b1916550996bca95b6b7a8f43d (diff) | |
download | raindrops-663111480d8222763e5f553a71166442ef9990cc.tar.gz |
Otherwise we'd keep forgetting and users would not know about us.
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -105,8 +105,21 @@ end desc "read news article from STDIN and post to rubyforge" task :publish_news do require 'rubyforge' - IO.select([STDIN], nil, nil, 1) or abort "E: news must be read from stdin" - msg = STDIN.readlines + spec = Gem::Specification.load('raindrops.gemspec') + tmp = Tempfile.new('rf-news') + _, subject, body = `git cat-file tag v#{spec.version}`.split(/\n\n/, 3) + tmp.puts subject + tmp.puts + tmp.puts spec.description.strip + tmp.puts "" + tmp.puts "* #{spec.homepage}" + tmp.puts "* #{spec.email}" + tmp.puts "* #{git_url}" + tmp.print "\nChanges:\n\n" + tmp.puts body + tmp.flush + system(ENV["VISUAL"], tmp.path) or abort "#{ENV["VISUAL"]} failed: #$?" + msg = File.readlines(tmp.path) subject = msg.shift blank = msg.shift blank == "\n" or abort "no newline after subject!" |