summaryrefslogtreecommitdiff
path: root/build-aux/announce-gen
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-05-17 22:24:59 +0200
committerJim Meyering <meyering@redhat.com>2011-05-18 12:21:49 +0200
commit15ebda34707d4ce1432e3f84426194f72e1f701a (patch)
tree31b6a9763cffcb5e1ff1d77259da4735d6c66ba7 /build-aux/announce-gen
parent00667b211fb2ea8f53cf5af2c0231e67257f0d86 (diff)
downloadgnulib-15ebda34707d4ce1432e3f84426194f72e1f701a.tar.gz
announce-gen: fail if the NEWS delta is empty
If there's nothing noteworthy in NEWS, then either you forgot or you shouldn't be releasing. * build-aux/announce-gen: Die if the NEWS delta is effectively empty.
Diffstat (limited to 'build-aux/announce-gen')
-rwxr-xr-xbuild-aux/announce-gen7
1 files changed, 6 insertions, 1 deletions
diff --git a/build-aux/announce-gen b/build-aux/announce-gen
index 233ee9b959..0eb6b5b6e7 100755
--- a/build-aux/announce-gen
+++ b/build-aux/announce-gen
@@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
if 0;
# Generate a release announcement message.
-my $VERSION = '2011-04-29 21:01'; # UTC
+my $VERSION = '2011-05-17 20:25'; # UTC
# The definition above must lie within the first 8 lines in order
# for the Emacs time-stamp write hook (at end) to update it.
# If you change this file with Emacs, please let the write hook
@@ -192,6 +192,7 @@ sub print_news_deltas ($$$)
my $re_prefix = qr/(?:\* )?(?:Noteworthy c|Major c|C)(?i:hanges)/;
+ my $found_news;
open NEWS, '<', $news_file
or die "$ME: $news_file: cannot open for reading: $!\n";
while (defined (my $line = <NEWS>))
@@ -214,12 +215,16 @@ sub print_news_deltas ($$$)
$line =~ /^$re_prefix.*(?:[^\d.]|$)\Q$prev_version\E(?:[^\d.]|$)/o
and last;
print $line;
+ $line =~ /\S/
+ and $found_news = 1;
}
}
close NEWS;
$in_items
or die "$ME: $news_file: no matching lines for `$curr_version'\n";
+ $found_news
+ or die "$ME: $news_file: no news item found for `$curr_version'\n";
}
sub print_changelog_deltas ($$)