Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 6361d510c6
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (18 sloc) 0.68 kB
desc 'update changelog'
task :changelog do
File.open('guide/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
Jump to Line
Something went wrong with that request. Please try again.