From 3a973517a915ce4ad408d239f9220b869ff8cf40 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 24 May 2015 00:09:23 +0200 Subject: log2changes.pl: moved to scripts/ --- scripts/log2changes.pl | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100755 scripts/log2changes.pl (limited to 'scripts') diff --git a/scripts/log2changes.pl b/scripts/log2changes.pl new file mode 100755 index 000000000..667daabf0 --- /dev/null +++ b/scripts/log2changes.pl @@ -0,0 +1,81 @@ +#!/usr/bin/perl + +# git log --pretty=fuller --no-color --date=short --decorate=full + +my @mname = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ); + +sub nicedate { + my ($date)=$_; + + if($date =~ /(\d\d\d\d)-(\d\d)-(\d\d)/) { + return sprintf("%d %s %4d", $3, $mname[$2-1], $1); + } + return $date; +} + +print +' _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + + Changelog +'; + +my $line; +my $tag; +while() { + my $l = $_; + + if($l =~/^commit ([[:xdigit:]]*) ?(.*)/) { + $co = $1; + my $ref = $2; + if ($ref =~ /refs\/tags\/curl-([0-9_]*)/) { + $tag = $1; + $tag =~ tr/_/./; + } + } + elsif($l =~ /^Author: *(.*) +