split read_write.c into {read,write,writev}.c
[kgio.git] / Rakefile
blobcbeb7a096b4a0d758fe80b8215a970a8095be3b6
1 # -*- encoding: binary -*-
2 cgit_url = "http://bogomips.org/kgio.git"
3 git_url = 'git://bogomips.org/kgio.git'
5 desc "post news article to rubyforge"
6 task :publish_news do
7   require 'rubyforge'
8   spec = Gem::Specification.load('kgio.gemspec')
9   tmp = Tempfile.new('rf-news')
10   _, subject, body = `git cat-file tag v#{spec.version}`.split(/\n\n/, 3)
11   tmp.puts subject
12   tmp.puts
13   tmp.puts spec.description.strip
14   tmp.puts ""
15   tmp.puts "* #{spec.homepage}"
16   tmp.puts "* #{spec.email}"
17   tmp.puts "* #{git_url}"
18   tmp.print "\nChanges:\n\n"
19   tmp.puts body
20   tmp.flush
21   system(ENV["VISUAL"], tmp.path) or abort "#{ENV["VISUAL"]} failed: #$?"
22   msg = File.readlines(tmp.path)
23   subject = msg.shift
24   blank = msg.shift
25   blank == "\n" or abort "no newline after subject!"
26   subject.strip!
27   body = msg.join("").strip!
29   rf = RubyForge.new.configure
30   rf.login
31   rf.post_news('rainbows', subject, body)
32 end