File: announce.rake

package info (click to toggle)
thin 1.2.4-1.1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,252 kB
  • ctags: 531
  • sloc: ruby: 4,529; ansic: 725; sh: 21; makefile: 16
file content (22 lines) | stat: -rw-r--r-- 556 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'erb'

MSG_TEMPLATE = File.dirname(__FILE__) + '/email.erb'
SEND_TO      = %w(thin-ruby@googlegroups.com ruby-talk@ruby-lang.org)

desc 'Generate a template for the new version annoucement'
task :ann do
  msg = ERB.new(File.read(MSG_TEMPLATE)).result(binding)
    
  body = <<END_OF_MESSAGE
To: #{SEND_TO.join(', ')}
Subject: [ANN] Thin #{Thin::VERSION::STRING} #{Thin::VERSION::CODENAME} release

#{msg}
END_OF_MESSAGE

  fork { `echo "#{body}" | mate` }
end

def changelog
  File.read('CHANGELOG').split("==")[1].split("\n")[1..-1].join("\n")
end