Sha256: 596ef1565fbc9ca2d2d65d83be591dabc4b23c9cc9dc1c4a987f4495bb3a2ea7

Contents?: true

Size: 620 Bytes

Versions: 53

Compression:

Stored size: 620 Bytes

Contents

require 'time'
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

53 entries across 53 versions & 2 rubygems

Version Path
bougyman-freeswitcher-0.1.4 tasks/changelog.rake
bougyman-freeswitcher-0.3.0 tasks/changelog.rake
bougyman-freeswitcher-0.3.1 tasks/changelog.rake
bougyman-freeswitcher-0.4.0 tasks/changelog.rake
bougyman-freeswitcher-0.4.1 tasks/changelog.rake
bougyman-freeswitcher-0.4.2 tasks/changelog.rake
freeswitcher-0.8.0 tasks/changelog.rake
freeswitcher-0.7.1 tasks/changelog.rake
freeswitcher-0.7.0 tasks/changelog.rake
freeswitcher-0.6.18 tasks/changelog.rake
freeswitcher-0.6.17 tasks/changelog.rake
freeswitcher-0.6.16 tasks/changelog.rake
freeswitcher-0.6.15 tasks/changelog.rake
freeswitcher-0.6.14 tasks/changelog.rake
freeswitcher-0.6.13 tasks/changelog.rake
freeswitcher-0.6.12 tasks/changelog.rake
freeswitcher-0.6.11 tasks/changelog.rake
freeswitcher-0.6.10 tasks/changelog.rake
freeswitcher-0.6.9 tasks/changelog.rake
freeswitcher-0.6.8 tasks/changelog.rake