1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-17 06:55:02 -05:00

release-notes: output trailing references sorted numerically

This commit is contained in:
Daniel Stenberg 2020-04-06 23:45:31 +02:00
parent fef4334091
commit 9b23a1da7c
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -27,7 +27,7 @@
# #
# 1. Get recent commits added to RELEASE-NOTES: # 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 # 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 # 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 # 3. Run the cleanup script and let it sort the entries and remove unused
# references from lines you removed in step (2): # 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 # 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. # 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 @refused;
my @o; my @o;
my @usedrefs;
for my $l (@releasenotes) { for my $l (@releasenotes) {
if($l =~ /^ o .*\[(\d+)\]/) { if($l =~ /^ o .*\[(\d+)\]/) {
$refused[$1]=1; $refused[$1]=1;
} }
elsif($l =~ /^ \[(\d+)\] = /) { elsif($l =~ /^ \[(\d+)\] = (.*)/) {
$refused[$1] |= 2; $refused[$1] |= 2;
$refnum=$1; $refnum=$1;
$usedrefs[$1] = $2;
} }
} }
@ -169,10 +171,6 @@ for my $l (@releasenotes) {
next; next;
} }
elsif($l =~ /^ \[(\d+)\] = /) { elsif($l =~ /^ \[(\d+)\] = /) {
if($refused[$1] & 1) {
# only output actually used references
push @o, $l;
}
next; next;
} }
elsif($bullets[0]) { elsif($bullets[0]) {
@ -189,11 +187,11 @@ for my $l (@releasenotes) {
} }
} }
for my $f (@line) { my @srefs;
my $n = $moreinfo{$f}; my $ln;
my $r; for my $n (1 .. $#usedrefs) {
if($n) { my $r = $usedrefs[$n];
$r = $refs[$n]; if($r && ($refused[$n] & 1)) {
push @o, sprintf " [%d] = %s\n", $n, $r; push @o, sprintf " [%d] = %s\n", $n, $r;
} }
} }