diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-04-06 23:45:31 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-04-06 23:45:31 +0200 |
commit | 9b23a1da7c996a045026c99d66a2fe326860050a (patch) | |
tree | d294c6a8f379c1e0ff8fe85ec835b73ee5c861ec /scripts/release-notes.pl | |
parent | fef4334091e714a0b71d6f5ebf12a65db4394317 (diff) | |
download | curl-9b23a1da7c996a045026c99d66a2fe326860050a.tar.gz |
release-notes: output trailing references sorted numerically
Diffstat (limited to 'scripts/release-notes.pl')
-rwxr-xr-x | scripts/release-notes.pl | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/scripts/release-notes.pl b/scripts/release-notes.pl index 3726dc977..df97ba9ef 100755 --- a/scripts/release-notes.pl +++ b/scripts/release-notes.pl @@ -27,7 +27,7 @@ # # 1. Get recent commits added to RELEASE-NOTES: # -# $ ./scripts/release-notes +# $ ./scripts/release-notes.pl # # 2. Edit RELEASE-NOTES and *remove* entries among the newly added ones that # don't belong. Don't mind leaving unused references below. Make sure to move @@ -37,7 +37,7 @@ # 3. Run the cleanup script and let it sort the entries and remove unused # references from lines you removed in step (2): # -# $ ./script/release-notes cleanup +# $ ./script/release-notes.pl cleanup # # 4. Reload RELEASE-NOTES and verify that things look okay. The cleanup # procedure can and should be re-run when lines are removed or rephrased. @@ -60,13 +60,15 @@ my $refnum; # the highest number used so far my @refused; my @o; +my @usedrefs; for my $l (@releasenotes) { if($l =~ /^ o .*\[(\d+)\]/) { $refused[$1]=1; } - elsif($l =~ /^ \[(\d+)\] = /) { + elsif($l =~ /^ \[(\d+)\] = (.*)/) { $refused[$1] |= 2; $refnum=$1; + $usedrefs[$1] = $2; } } @@ -169,10 +171,6 @@ for my $l (@releasenotes) { next; } elsif($l =~ /^ \[(\d+)\] = /) { - if($refused[$1] & 1) { - # only output actually used references - push @o, $l; - } next; } elsif($bullets[0]) { @@ -189,11 +187,11 @@ for my $l (@releasenotes) { } } -for my $f (@line) { - my $n = $moreinfo{$f}; - my $r; - if($n) { - $r = $refs[$n]; +my @srefs; +my $ln; +for my $n (1 .. $#usedrefs) { + my $r = $usedrefs[$n]; + if($r && ($refused[$n] & 1)) { push @o, sprintf " [%d] = %s\n", $n, $r; } } |