summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2023-01-02 11:31:29 +0100
committerDaniel Stenberg <daniel@haxx.se>2023-01-02 11:31:29 +0100
commit9ca194b5e2b2e18017080f337a0372ec25d2603c (patch)
tree6613de774051502ec793077fbcb8e923644e0699 /scripts
parentf27262b17965aefa7c6bf41bd40b01b4f97407bd (diff)
downloadcurl-9ca194b5e2b2e18017080f337a0372ec25d2603c.tar.gz
release-notes.pl: check fixes/closes lines better
To better skip lines that just happen to mention those words at the start of a line without being instructions.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/release-notes.pl17
1 files changed, 11 insertions, 6 deletions
diff --git a/scripts/release-notes.pl b/scripts/release-notes.pl
index 9e1c4a58c..42f9b7a4d 100755
--- a/scripts/release-notes.pl
+++ b/scripts/release-notes.pl
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 2020 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 2020 - 2023, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -88,6 +88,7 @@ sub getref {
# 'num'
# 'https://github.com/curl/curl/issues/6939'
# 'https://github.com/curl/curl-www/issues/69'
+# 'https://elsewhere.example.com/discussion'
sub extract {
my ($ref)=@_;
@@ -99,10 +100,11 @@ sub extract {
# return the plain number
return $1;
}
- else {
- # return the URL
+ elsif($ref =~ /:\/\//) {
+ # contains a '://', return the URL
return $ref;
}
+ # false alarm, not a valid line
}
my $short;
@@ -132,13 +134,16 @@ for my $l (@gitlog) {
my $line = $1;
if($line =~ /^Fixes(:|) *(.*)/i) {
- push @fixes, extract($2);
+ my $ref = extract($2);
+ push @fixes, $ref if($ref);
}
elsif($line =~ /^Clo(s|)es(:|) *(.*)/i) {
- push @closes, extract($3);
+ my $ref = extract($3);
+ push @closes, $ref if($ref);
}
elsif($line =~ /^Bug: (.*)/i) {
- push @bug, extract($1);
+ my $ref = extract($1);
+ push @bug, $ref if($ref);
}
}
}