From 382d12a414942f027ea30911294cd8c8becdf2cd Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 17 Sep 2009 02:55:00 -0700 Subject: doc: generate ChangeLog and NEWS file for RDoc No point in having those files under revision control or repeating work to generate them. --- Rakefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index d06f780..c5e45ba 100644 --- a/Rakefile +++ b/Rakefile @@ -37,3 +37,18 @@ task :ragel do raise "Failed to build C source" unless File.exist? target end end + +desc 'prints RDoc-formatted history' +task :history do + tags = `git tag -l`.split(/\n/).grep(/^v[\d\.]+$/).reverse + timefmt = '%Y-%m-%d %H:%M UTC' + tags.each do |tag| + header, subject, body = `git cat-file tag #{tag}`.split(/\n\n/, 3) + tagger = header.split(/\n/).grep(/^tagger /).first.split(/\s/) + time = Time.at(tagger[-2].to_i).utc + puts "=== #{tag.sub(/^v/, '')} / #{time.strftime(timefmt)}" + puts "" + puts body ? body.gsub(/^/sm, " ") : " initial" + puts "" + end +end -- cgit v1.2.3-24-ge0c7