5 ./git2changelog.pl Release-3.0.1..Release-3.0.2
7 For bweb ReleaseNotes, use
8 FORBWEB=1 ./git2changelog.pl Release-3.0.1..Release-3.0.2
13 use POSIX q/strftime/;
18 my $refs = shift || '';
19 my $for_bweb = $ENV{FORBWEB}?1:0;
20 open(FP, "git log --no-merges --pretty=format:'%at: %s' $refs|") or die "Can't run git log $!";
21 while (my $l = <FP>) {
23 # remove non useful messages
24 next if ($l =~ /(tweak|typo|cleanup|regress:|again|.gitignore|fix compilation|technotes)/ixs);
25 next if ($l =~ /update (version|technotes|kernstodo|projects|releasenotes|version|home|release|todo|notes|changelog|tpl|configure)/i);
28 next if ($l !~ /bweb/ixs);
31 next if ($l =~ /bweb:/ixs);
34 # keep list of fixed bugs
39 # remove old commit format
40 $l =~ s/^(\d+): (kes|ebl) /$1: /;
42 if ($l =~ /(\d+): (.+)/) {
44 my $dnow = strftime('%d%b%y', localtime($1));
47 # avoid identical multiple commit message
48 next if ($last_txt eq $txt);
51 # We format the string on 79 caracters
53 $txt =~ s/.{70,77} /$&\n /g;
55 # if we are the same day, just add entry
63 print STDERR "invalid format: $l\n";
69 print "\nBug fixes\n";
70 print join(" ", sort keys %bugs), "\n";