All,

I've for a long time had the trouble that 'make release' did not work
properly on machines that run in UTC (such as GitLab CI/CD pipeline),
after I do 'make release-commit' on my local CET laptop, during
00:00-00:59.  I've not bothered to debug this until now, since waiting
for one hour just fixed the problem, and it wasn't a common operation.
Today I debugged why this happens.  I realized that this is a time bomb
in maint.mk that would prevent 'make release' to work all day except
during the same day that 'make release-commit' was run (modulo the time
zone confusion).

I don't think failing 'make release' on other days than the release day
is a good idea.  I expect 'make release' to produce the same output that
it does today if I run it in five years, on an older git commit/tag.
Erroring out just make it harder to reproduce the same artifacts that
was produced when making the release.

I've installed the attached patch so that 'news-check' (used by
'release' target) only looks for a year regexp rather than only
accepting todays date, solving both problems above.

/Simon
From c89cd2fbd3b9f3d7c5a146247256599714c91ec7 Mon Sep 17 00:00:00 2001
From: Simon Josefsson <si...@josefsson.org>
Date: Sat, 1 Feb 2025 00:58:45 +0100
Subject: [PATCH] announce-gen: Allow 'make release' to work any day.

* top/maint.mk (today): Use regexp rather than current time.
---
 ChangeLog    | 5 +++++
 top/maint.mk | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 2f0e8d34e7..89674821a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2025-02-01  Simon Josefsson  <si...@josefsson.org>
+
+	announce-gen: Allow 'make release' to work any day.
+	* top/maint.mk (today): Use regexp rather than current time.
+
 2025-02-01  Simon Josefsson  <si...@josefsson.org>
 
 	announce-gen: Deal with 'guix --version'.
diff --git a/top/maint.mk b/top/maint.mk
index 78c757d8f1..fb2fba93c9 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -148,7 +148,7 @@ url_dir_list ?= $(if $(call _equal,$(gnu_rel_host),ftp.gnu.org),	\
 
 # Override this in cfg.mk if you are using a different format in your
 # NEWS file.
-today = $(shell date +%Y-%m-%d)
+today = [0-9]{4,}-[0-9][0-9]-[0-9][0-9]
 
 # Select which lines of NEWS are searched for $(news-check-regexp).
 # This is a sed line number spec.  The default says that we search
-- 
2.48.1

Attachment: signature.asc
Description: PGP signature

Reply via email to