2018-01-07 14:34:46 +08:00
|
|
|
#!/usr/bin/env perl
|
2020-03-23 21:44:29 +08:00
|
|
|
#***************************************************************************
|
|
|
|
# _ _ ____ _
|
|
|
|
# Project ___| | | | _ \| |
|
|
|
|
# / __| | | | |_) | |
|
|
|
|
# | (__| |_| | _ <| |___
|
|
|
|
# \___|\___/|_| \_\_____|
|
|
|
|
#
|
2023-01-02 20:51:48 +08:00
|
|
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2020-03-23 21:44:29 +08:00
|
|
|
#
|
|
|
|
# This software is licensed as described in the file COPYING, which
|
|
|
|
# you should have received as part of this distribution. The terms
|
2020-11-04 21:02:01 +08:00
|
|
|
# are also available at https://curl.se/docs/copyright.html.
|
2020-03-23 21:44:29 +08:00
|
|
|
#
|
|
|
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
# copies of the Software, and permit persons to whom the Software is
|
|
|
|
# furnished to do so, under the terms of the COPYING file.
|
|
|
|
#
|
|
|
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
# KIND, either express or implied.
|
|
|
|
#
|
2022-05-17 17:16:50 +08:00
|
|
|
# SPDX-License-Identifier: curl
|
|
|
|
#
|
2020-03-23 21:44:29 +08:00
|
|
|
###########################################################################
|
2010-06-20 05:08:34 +08:00
|
|
|
|
2010-06-22 04:21:25 +08:00
|
|
|
# git log --pretty=fuller --no-color --date=short --decorate=full
|
2010-06-20 05:08:34 +08:00
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2022-11-12 07:07:34 +08:00
|
|
|
sub printmsg {
|
|
|
|
my ($p, $msg)=@_;
|
|
|
|
while(length($msg) > 77) {
|
|
|
|
print $p.substr($msg, 0, 77, "")."\n";
|
|
|
|
$p=" ";
|
|
|
|
}
|
|
|
|
if($msg eq "") {
|
|
|
|
$p = "";
|
|
|
|
}
|
|
|
|
print "$p$msg\n";
|
|
|
|
}
|
|
|
|
|
2018-09-24 06:24:02 +08:00
|
|
|
print
|
2010-06-22 03:24:27 +08:00
|
|
|
' _ _ ____ _
|
|
|
|
___| | | | _ \| |
|
|
|
|
/ __| | | | |_) | |
|
|
|
|
| (__| |_| | _ <| |___
|
|
|
|
\___|\___/|_| \_\_____|
|
|
|
|
|
|
|
|
Changelog
|
|
|
|
';
|
|
|
|
|
|
|
|
my $tag;
|
2010-06-20 05:08:34 +08:00
|
|
|
while(<STDIN>) {
|
|
|
|
my $l = $_;
|
|
|
|
|
2010-06-22 03:24:27 +08:00
|
|
|
if($l =~/^commit ([[:xdigit:]]*) ?(.*)/) {
|
2010-06-20 05:08:34 +08:00
|
|
|
$co = $1;
|
2010-06-22 03:24:27 +08:00
|
|
|
my $ref = $2;
|
2010-06-22 04:21:25 +08:00
|
|
|
if ($ref =~ /refs\/tags\/curl-([0-9_]*)/) {
|
2010-06-22 03:24:27 +08:00
|
|
|
$tag = $1;
|
2011-12-30 10:36:18 +08:00
|
|
|
$tag =~ tr/_/./;
|
2010-06-22 03:24:27 +08:00
|
|
|
}
|
2010-06-20 05:08:34 +08:00
|
|
|
}
|
|
|
|
elsif($l =~ /^Author: *(.*) +</) {
|
|
|
|
$c = $1;
|
|
|
|
}
|
|
|
|
elsif($l =~ /^CommitDate: (.*)/) {
|
|
|
|
$date = nicedate($1);
|
|
|
|
}
|
|
|
|
elsif($l =~ /^( )(.*)/) {
|
2022-11-12 07:07:34 +08:00
|
|
|
my $pref = " ";
|
2010-06-22 04:21:25 +08:00
|
|
|
if ($tag) {
|
|
|
|
# Version entries have a special format
|
|
|
|
print "\nVersion " . $tag." ($date)\n";
|
|
|
|
$oldc = "";
|
2012-06-08 05:49:14 +08:00
|
|
|
$tag = "";
|
2010-06-22 04:21:25 +08:00
|
|
|
}
|
2010-06-20 05:08:34 +08:00
|
|
|
if($co ne $oldco) {
|
|
|
|
if($c ne $oldc) {
|
2022-11-12 07:07:34 +08:00
|
|
|
print "\n$c ($date)\n\n";
|
2010-06-20 05:08:34 +08:00
|
|
|
}
|
|
|
|
else {
|
2022-11-12 07:07:34 +08:00
|
|
|
print "\n";
|
2010-06-20 05:08:34 +08:00
|
|
|
}
|
2022-11-12 07:07:34 +08:00
|
|
|
$pref = "- ";
|
2010-06-20 05:08:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
$oldco = $co;
|
|
|
|
$oldc = $c;
|
|
|
|
$olddate = $date;
|
2022-11-12 07:07:34 +08:00
|
|
|
printmsg($pref, $2);
|
2010-06-20 05:08:34 +08:00
|
|
|
}
|
|
|
|
}
|