[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/12: maint: Use reproducible Git timestamp for POT-Creation-Date.
From: |
guix-commits |
Subject: |
08/12: maint: Use reproducible Git timestamp for POT-Creation-Date. |
Date: |
Sat, 6 Apr 2024 17:16:33 -0400 (EDT) |
janneke pushed a commit to branch wip-tarball
in repository guix.
commit 0761c8a153cb6e4e6144f57c2fa7eb0fc70c2950
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Wed Apr 3 08:08:12 2024 +0200
maint: Use reproducible Git timestamp for POT-Creation-Date.
* po/doc/local.mk (%D%/%.pot): Replace POT-Creation-Date using timestamp
from
Git.
(%D%/guix-manual.pot): Likewise.
Change-Id: I1b7f8cc147084c1804deb7be9d36e5eeda2599cb
---
po/doc/local.mk | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/po/doc/local.mk b/po/doc/local.mk
index dd6ba30133..77ec4721e3 100644
--- a/po/doc/local.mk
+++ b/po/doc/local.mk
@@ -1,6 +1,7 @@
# GNU Guix --- Functional package management for GNU
# Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
# Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+# Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
#
# This file is part of GNU Guix.
#
@@ -44,12 +45,19 @@ POT_OPTIONS = \
--msgid-bugs-address "bug-guix@gnu.org"
%D%/%.pot: $(srcdir)/doc/%.texi
- $(AM_V_PO4A)$(PO4A_UPDATEPO) -M UTF-8 -f texinfo -m "$<" \
- -p "$@" $(POT_OPTIONS) && \
- touch $@
+ $(AM_V_PO4A)$(PO4A_UPDATEPO) -M UTF-8 -f texinfo -m "$<" \
+ -p "$@-t" $(POT_OPTIONS)
+ date="$$(git log --pretty=format:%ci -n 1 -- $< 2>/dev/null \
+ || echo $(SOURCE_DATE_EPOCH))" \
+ sed -ri -e "s,^(.POT-Creation-Date: )[^\]*,\1$$date," "$@-t"
+ mv "$@-t" "$@"
%D%/guix-manual.pot: %D%/guix.pot %D%/contributing.pot
- msgcat $^ > $@
+ msgcat $^ > "$@-t"
+ date="$$(git log --pretty=format:%ci -n 1 -- $< 2>/dev/null \
+ || echo $(SOURCE_DATE_EPOCH))" \
+ sed -ri "s,^(.POT-Creation-Date: )[^\]*,\1$$date," "$@-t"
+ mv "$@-t" "$@"
doc-pot-update: %D%/guix-manual.pot %D%/guix-cookbook.pot
.PHONY: doc-pot-update
- branch wip-tarball created (now 933766d5b3), guix-commits, 2024/04/06
- 01/12: maint: Cater for running `make dist' from a worktree., guix-commits, 2024/04/06
- 06/12: maint: Generate 'doc/version-LANG.texi' reproducibly., guix-commits, 2024/04/06
- 07/12: maint: Use xgettext.scm wrapper to create .PO files reproducibly., guix-commits, 2024/04/06
- 02/12: maint: Use reproducible timestamps and name for tarball., guix-commits, 2024/04/06
- 03/12: maint: Generate 'doc/version.texi' reproducibly., guix-commits, 2024/04/06
- 04/12: maint: Help help2man generate reproducible man-pages., guix-commits, 2024/04/06
- 05/12: maint: Generate AUTHORS and ChangeLog reproducibly., guix-commits, 2024/04/06
- 12/12: maint: Ensure generated file reproducibility for dist., guix-commits, 2024/04/06
- 08/12: maint: Use reproducible Git timestamp for POT-Creation-Date.,
guix-commits <=
- 10/12: maint: Avoid PNG and PDF generation to fail silently., guix-commits, 2024/04/06
- 09/12: maint: Remove %%CreationDate from generated EPS files, guix-commits, 2024/04/06
- 11/12: maint: Reset CreationDate metadata on generated PDFs., guix-commits, 2024/04/06