about summary refs log tree commit homepage
path: root/Rakefile
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-12-29 09:03:37 +0000
committerEric Wong <normalperson@yhbt.net>2010-12-29 09:07:17 +0000
commit074b2ddc09517274b058a68fd1d40c59e35ca3a5 (patch)
tree3bcbe5ba113fd8ccb7e2ed88985ce2ab010039dd /Rakefile
parente98836e165fa46b67fc57adc1ce59620f4f3fc4d (diff)
downloadrainbows-074b2ddc09517274b058a68fd1d40c59e35ca3a5.tar.gz
Oops
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Rakefile b/Rakefile
index 3c5b1a3..e0df2f3 100644
--- a/Rakefile
+++ b/Rakefile
@@ -81,9 +81,12 @@ task :fm_update do
   uri = URI.parse('http://freshmeat.net/projects/rainbows/releases.json')
   rc = Net::Netrc.locate('rainbows-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