Sha256: be54fbefee62f209bba14869e8f46dcf1551157038c13a56328533f5a9f5f3c3

Contents?: true

Size: 666 Bytes

Versions: 13

Compression:

Stored size: 666 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.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 & 4 rubygems

Version Path
Pistos-ramaze-2009.06.12 tasks/changelog.rake
manveru-ramaze-2009.06.04 tasks/changelog.rake
manveru-ramaze-2009.06.12 tasks/changelog.rake
manveru-ramaze-2009.06 tasks/changelog.rake
manveru-ramaze-2009.07 tasks/changelog.rake
rjspotter-ramaze-2009.06.29 tasks/changelog.rake
rjspotter-ramaze-2009.06.31 tasks/changelog.rake
ramaze-2010.01 tasks/changelog.rake
ramaze-2009.10 tasks/changelog.rake
ramaze-2009.07 tasks/changelog.rake
ramaze-2009.06 tasks/changelog.rake
ramaze-2009.06.12 tasks/changelog.rake
ramaze-2009.06.04 tasks/changelog.rake