bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] announce-gen: Mention git commit in release announcement.


From: Simon Josefsson
Subject: [PATCH] announce-gen: Mention git commit in release announcement.
Date: Sun, 12 May 2024 17:42:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

All,

Our release announcements does not mention the git commit hash that was
used to prepare the release.  While SHA1 is broken, I still think
including the commit hash provide some additional information that may
be useful further down the line, and hopefully including doesn't incur
too much cognitive load on the reader (that isn't already present..).

I haven't pushed the attached patch since I'm not a native speaker.
Could someone suggest better wording, if needed?  Or better placement in
the announcement?

To read the result of the patch in context, take some earlier
announcement:

https://lists.gnu.org/archive/html/info-gnu/2024-03/msg00006.html

and then consider that the patch would turn the following snippet (for a
hypothethical upcoming GNU inetutils release) text:

This release was bootstrapped with the following tools:
  Gnulib aacceb6eff
  Autoconf 2.71
  Automake 1.16.5
  Bison 3.8.2
  M4 1.4.18
  Makeinfo 6.8
  Help2man 1.49.1
  Make 4.3
  Gzip 1.10
  Tar 1.34

and turn that into this:

This release was built bootstrapped with the following tools
using inetutils git commit 524d4b6934db12b9f43be410d2f201fdb40cfc97:

  Gnulib aacceb6eff
  Autoconf 2.71
  Automake 1.16.5
  Bison 3.8.2
  M4 1.4.18
  Makeinfo 6.8
  Help2man 1.49.1
  Make 4.3
  Gzip 1.10
  Tar 1.34

Does this make sense?  Is the location in the announcement e-mail a good
one?  This hides it a bit further down which I think makes sense.  Few
readers care about git commit and bootstrapping versions, and the
information is related.  The new version adds an empty line which I
think is more consistent with the other paragraphs.

Thoughts?

/Simon
From 8be372e8ddfaa5b7202e2b58b22e55c00d9016c5 Mon Sep 17 00:00:00 2001
From: Simon Josefsson <simon@josefsson.org>
Date: Sun, 12 May 2024 17:31:51 +0200
Subject: [PATCH] announce-gen: Mention git commit in release announcement.

* build-aux/announce-gen (this_commit_hash): New variable.
(main): Print commit hash.
---
 ChangeLog              | 6 ++++++
 build-aux/announce-gen | 6 ++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b6aa21d7f7..20dbe3c2a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-05-12  Simon Josefsson  <simon@josefsson.org>
+
+       announce-gen: Mention git commit in release announcement.
+       * build-aux/announce-gen (this_commit_hash): New variable.
+       (main): Print commit hash.
+
 2024-05-12  Simon Josefsson  <simon@josefsson.org>
 
        maintainer-makefile: Silence announce-gen error with GNULIB_REVISION.
diff --git a/build-aux/announce-gen b/build-aux/announce-gen
index f9e20129dd..3d47ceb9a7 100755
--- a/build-aux/announce-gen
+++ b/build-aux/announce-gen
@@ -35,7 +35,7 @@
 eval 'exec perl -wSx "$0" "$@"'
      if 0;
 
-my $VERSION = '2023-12-29 18:26'; # UTC
+my $VERSION = '2024-05-12 15:30'; # 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
@@ -551,6 +551,8 @@ EOF
   chomp (my $n_ci = `git rev-list "v$v0..v$v1" | wc -l`);
   chomp (my $n_p = `git shortlog "v$v0..v$v1" | grep -c '^[^ ]'`);
 
+  my $this_commit_hash = `git log --pretty=%H -1 "v$v1"`;
+  chop $this_commit_hash;
   my $prev_release_date = `git log --pretty=%ct -1 "v$v0"`;
   my $this_release_date = `git log --pretty=%ct -1 "v$v1"`;
   my $n_seconds = $this_release_date - $prev_release_date;
@@ -672,7 +674,7 @@ EOF
 
   my @tool_versions = get_tool_versions (\@tool_list, $gnulib_version);
   @tool_versions
-    and print "\nThis release was bootstrapped with the following tools:",
+    and print "\nThis release was built bootstrapped with the following 
tools\nusing $package_name git commit $this_commit_hash:\n",
       join ('', map {"\n  $_"} @tool_versions), "\n";
 
   print_news_deltas ($_, $prev_version, $curr_version)
-- 
2.41.0

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]