about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-12-26 08:10:35 +0000
committerEric Wong <normalperson@yhbt.net>2010-12-26 08:11:03 +0000
commit2eb2c74aeb0da1d3f6f575ff8e05715e8c5ed85e (patch)
treeecc5eb4047e9b9c652ef8e0f243ceefd55c3bc3d
parent6f7a3958c1544c1034ecf8b1ccfdd9dabd171fd2 (diff)
downloadunicorn-2eb2c74aeb0da1d3f6f575ff8e05715e8c5ed85e.tar.gz
Oops!
-rw-r--r--Rakefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Rakefile b/Rakefile
index 62c1344..598cf07 100644
--- a/Rakefile
+++ b/Rakefile
@@ -51,9 +51,12 @@ task :fm_update do
   uri = URI.parse('http://freshmeat.net/projects/unicorn/releases.json')
   rc = Net::Netrc.locate('unicorn-fm') or abort "~/.netrc not found"
   api_token = rc.password
-  changelog = tags.find { |t| t[:tag] == "v#{version}" }[:body]
+  _, subject, body = `git cat-file tag v#{version}`.split(/\n\n/, 3)
   tmp = Tempfile.new('fm-changelog')
-  tmp.syswrite(changelog)
+  tmp.puts subject
+  tmp.puts
+  tmp.puts body
+  tmp.flush
   system(ENV["VISUAL"], tmp.path) or abort "#{ENV["VISUAL"]} failed: #$?"
   changelog = File.read(tmp.path).strip