Skip to content

HTTPS clone URL

Subversion checkout URL

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

Cannot retrieve contributors at this time

14 lines (12 sloc) 0.484 kB
desc "Creates/updates history file."
task :changelog do |spec|
history = `git log master --date=short --format='%d;%cd;%s;%b;'`
File.open("#{spec.name.upcase}", "w+") do |changelog|
history.scan(/(.*?);(.*?);(.*?);(.*?);/m) do |tag, date, subject, content|
tag.gsub! /[\n\( ].*?:[\) ]|,.*,.*[\)\n ]|[\)\n ]/m, ""
tag = tag.empty? ? "v0.0.0" : "v#{tag}"
changelog << "== #{tag} - #{date} - #{subject}\n"
changelog << "\n#{content}\n"
end
end
end
Jump to Line
Something went wrong with that request. Please try again.