Sha256: fde49ebed307228c5dc26b1b1f10e8dbf4ee6853118b5fefa5347060b3fc4e11

Contents?: true

Size: 599 Bytes

Versions: 8

Compression:

Stored size: 599 Bytes

Contents

desc 'update changelog'
task :changelog do
  File.open('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

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
snusnu-dm-is-localizable-0.0.5 tasks/changelog.rb
snusnu-dm-is-localizable-0.0.6 tasks/changelog.rb
snusnu-dm-is-localizable-0.0.7 tasks/changelog.rb
snusnu-dm-is-localizable-0.0.8 tasks/changelog.rb
snusnu-dm-is-localizable-0.0.9 tasks/changelog.rb
snusnu-dm-is-localizable-0.10.0 tasks/changelog.rb
dm-is-localizable-1.0.0 tasks/changelog.rake
dm-is-localizable-0.10.1 tasks/changelog.rb