Sha256: 9264e4c87cff7fa1d8214898cf78f49b31e2bdd52a334e00e2c15982feb4978e

Contents?: true

Size: 678 Bytes

Versions: 13

Compression:

Stored size: 678 Bytes

Contents

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
      time   = time.strftime('%a %b %d %H:%M:%S %Z %Y')

      title = title.to_s.strip

      changelog.puts "[#{ref} | #{time}] #{author}"
      changelog.puts '', "  * #{title}"
      changelog.puts '', message.rstrip if message
      changelog.puts
    end
  end
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
makura-2012.01 tasks/changelog.rake
ramaze-2011.07.25 tasks/changelog.rake
ffi-magic-2011.04.22 tasks/changelog.rake
ffi-magic-2011.04 tasks/changelog.rake
ramaze-2011.01.30 tasks/changelog.rake
ramaze-2011.01 tasks/changelog.rake
makura-2011.01.21 tasks/changelog.rake
makura-2010.08.26 tasks/changelog.rake
makura-2010.08 tasks/changelog.rake
ramaze-2010.06.18 tasks/changelog.rake
ramaze-2010.04.04 tasks/changelog.rake
ramaze-2010.04 tasks/changelog.rake
ramaze-2010.03 tasks/changelog.rake