]> Savannah Git Hosting - gnulib.git/commitdiff
announce-gen: Deal with 'guix --version'.
authorSimon Josefsson <simon@josefsson.org>
Fri, 31 Jan 2025 23:24:27 +0000 (00:24 +0100)
committerSimon Josefsson <simon@josefsson.org>
Fri, 31 Jan 2025 23:24:27 +0000 (00:24 +0100)
* build-aux/announce-gen (get_tool_versions): Handle git commit
--versions.  Improve error message.

ChangeLog
build-aux/announce-gen

index fb649ea68cc9887ed4295b7b8762cc2ac851edd2..2f0e8d34e7687b760cafebee953bdc9c6e19df9e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-02-01  Simon Josefsson  <simon@josefsson.org>
+
+       announce-gen: Deal with 'guix --version'.
+       * build-aux/announce-gen (get_tool_versions): Handle git commit
+       --versions.  Improve error message.
+
 2025-01-28  Collin Funk  <collin.funk1@gmail.com>
 
        doc: Document version-etc, version-etc-fsf, and argp-version-etc.
index fc3787bf62086c91ca67d7fd10b4f65bbd2af8e0..8e75608cbdc94913917e484ec2423e35a238c727 100755 (executable)
@@ -35,7 +35,7 @@
 eval 'exec perl -wSx "$0" "$@"'
      if 0;
 
-my $VERSION = '2024-12-28 18:31'; # UTC
+my $VERSION = '2025-01-31 23:21'; # 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
@@ -375,16 +375,16 @@ sub get_tool_versions ($$)
       # Assume that the last "word" on the first line of
       # 'tool --version' output is the version string.
       my ($first_line, undef) = split ("\n", `$t --version`);
-      if ($first_line =~ /.* (\d[\w.-]+)$/)
+      if ($first_line =~ /.* ([a-f\d][\w.-]+)$/)
         {
           $t = ucfirst $t;
           push @tool_version_pair, "$t $1";
         }
       else
         {
+          warn "$t: unexpected --version output:\n$first_line";
           defined $first_line
             and $first_line = '';
-          warn "$t: unexpected --version output\n:$first_line";
           $fail = 1;
         }
     }