public
Description: Ramaze is a simple, light and modular open-source web application framework written in Ruby.
Homepage: http://ramaze.net
Clone URL: git://github.com/manveru/ramaze.git
Click here to lend your support to: ramaze and make a donation at www.pledgie.com !
ramaze / tasks / changelog.rake
100644 19 lines (17 sloc) 0.609 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
desc 'update changelog'
task :changelog do
  File.open('doc/CHANGELOG', 'w+') do |changelog|
    `git log -z --abbrev-commit`.split("\0").each do |commit|
      next if commit =~ /^Merge: \d*/
      ref, author, time, _, title, _, message = commit.split("\n", 7)
      ref = ref[/commit ([0-9a-f]+)/, 1]
      author = author[/Author: (.*)/, 1].strip
      time = Time.parse(time[/Date: (.*)/, 1]).utc
      title.strip!
 
      changelog.puts "[#{ref} | #{time}] #{author}"
      changelog.puts '', " * #{title}"
      changelog.puts '', message.rstrip if message
      changelog.puts
    end
  end
end