Skip to content

Commit

Permalink
chore: simple script to compose release notes
Browse files Browse the repository at this point in the history
To be executed like ./release_notes.sh REL9_4_1200..HEAD

fixes pgjdbc#357
  • Loading branch information
vlsi committed Aug 6, 2015
1 parent 3777937 commit 341ff8e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions release_notes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

git shortlog --format="%s@@@%H@@@%h@@@" --no-merges $1 | perl release_notes_filter.pl
18 changes: 18 additions & 0 deletions release_notes_filter.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/perl

while(<>) {
if ($_ !~ /@@@/) {
print $_;
next;
}
my @c = split('@@@', $_);
my $subject = @c[0];
my $sha = @c[1];
my $shortSha = @c[2];
my $body = `git log --format='%B' -n 1 $sha`;
my $pr = '';
if ($body =~ /(?:fix|fixes|close|closes) *#?(\d+)/) {
$pr = ' PR #'.$1;
}
print $subject.$pr." (".$shortSha.")\n";
}

0 comments on commit 341ff8e

Please sign in to comment.