]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
* announce-gen: Remove unused --release-archive-directory option.
authorJim Meyering <jim@meyering.net>
Wed, 22 Nov 2006 11:35:02 +0000 (12:35 +0100)
committerJim Meyering <jim@meyering.net>
Wed, 22 Nov 2006 11:35:02 +0000 (12:35 +0100)
(print_news_deltas): Accept new adjective, "Noteworthy", in addition
to the old "Major".
Match version numbers in NEWS using tighter regular expressions.
(main): Require the --gpg-key-id=ID option.

ChangeLog
announce-gen

index 4944ef66800b62ec94e6e1ca4417f42213e0e59b..ab59988a17e8743b27d9499deb541bc5a6714496 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2006-11-22  Jim Meyering  <jim@meyering.net>
 
+       * announce-gen: Remove unused --release-archive-directory option.
+       (print_news_deltas): Accept new adjective, "Noteworthy", in addition
+       to the old "Major".
+       Match version numbers in NEWS using tighter regular expressions.
+       (main): Require the --gpg-key-id=ID option.
+
        * NEWS: Mention the three noteworthy changes, all fixed via gnulib.
 
 2006-11-21  Jim Meyering  <jim@meyering.net>
index 8a30566e095151513068ef539169465017a7dc0b..3330ad6edee3b8dcef7171ea9715305b8f455d4c 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 # Generate an announcement message.
 
-# Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -78,7 +78,6 @@ OPTIONS:
    --previous-version=VER
    --current-version=VER
    --gpg-key-id=ID         The GnuPG ID of the key used to sign the tarballs
-   --release-archive-directory=DIR
    --url-directory=URL_DIR
    --news=NEWS_FILE             optional
 
@@ -192,26 +191,28 @@ sub print_news_deltas ($$$)
   # the first occurrence of $prev_version.
   my $in_items;
 
+  my $re_prefix = qr/\* (:?Noteworthy|Major) change/;
+
   open NEWS, '<', $news_file
     or die "$ME: $news_file: cannot open for reading: $!\n";
   while (defined (my $line = <NEWS>))
     {
       if ( ! $in_items)
        {
-         # Match lines like this one:
+         # Match lines like these:
          # * Major changes in release 5.0.1:
-         # but not any other line that starts with a space, *, or -.
-         $line =~ /^(\* Major changes.*|[^ *-].*)\Q$curr_version\E/o
+         # * Noteworthy changes in release 6.6 (2006-11-22) [stable]
+         $line =~ /^$re_prefix.*(:?[^\d.]|$)\Q$curr_version\E(:?[^\d.]|$)/o
            or next;
          $in_items = 1;
          print $line;
        }
       else
        {
-         # Be careful that this regexp cannot match version numbers
-         # in NEWS items -- they might well say `introduced in 4.5.5',
+         # This regexp must not match version numbers in NEWS items.
+         # For example, they might well say `introduced in 4.5.5',
          # and we don't want that to match.
-         $line =~ /^(\* Major changes.*|[^ *-].*)\Q$prev_version\E/o
+         $line =~ /^$re_prefix.*(:?[^\d.]|$)\Q$prev_version\E(:?[^\d.]|$)/o
            and last;
          print $line;
        }
@@ -317,7 +318,6 @@ sub print_changelog_deltas ($$)
   my $package_name;
   my $prev_version;
   my $curr_version;
-  my $release_archive_dir;
   my $gpg_key_id;
   my @url_dir_list;
   my @news_file;
@@ -329,7 +329,6 @@ sub print_changelog_deltas ($$)
      'previous-version=s' => \$prev_version,
      'current-version=s'  => \$curr_version,
      'gpg-key-id=s'       => \$gpg_key_id,
-     'release-archive-directory=s' => \$release_archive_dir,
      'url-directory=s'    => \@url_dir_list,
      'news=s'             => \@news_file,
 
@@ -347,8 +346,8 @@ sub print_changelog_deltas ($$)
     or (warn "$ME: previous version string not specified\n"), $fail = 1;
   $curr_version
     or (warn "$ME: current version string not specified\n"), $fail = 1;
-  $release_archive_dir
-    or (warn "$ME: release directory name not specified\n"), $fail = 1;
+  $gpg_key_id
+    or (warn "$ME: GnuPG key ID not specified\n"), $fail = 1;
   @url_dir_list
     or (warn "$ME: URL directory name(s) not specified\n"), $fail = 1;