[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] MODULES.html.sh: handle tarball builds
From: |
Bernhard M. Wiedemann |
Subject: |
[PATCH] MODULES.html.sh: handle tarball builds |
Date: |
Tue, 24 Mar 2020 10:06:18 +0100 |
Distributions typically build binaries from release tarballs
that do not contain a .git directory.
In such a setup the git log would fail.
This patch provides a fallback that still allows for reproducibility.
See https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.
This also replaces the git log line with a simpler equivalent.
CC: Bruno Haible <address@hidden>
---
MODULES.html.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/MODULES.html.sh b/MODULES.html.sh
index b1638dada..0151670cc 100755
--- a/MODULES.html.sh
+++ b/MODULES.html.sh
@@ -3695,7 +3695,10 @@ func_echo '<LI>A POT file and some PO files'
func_end UL
func_echo '<HR>'
-git_checkout_date=`git log -n 1 --date=iso --format=fuller | sed -n -e
's/^CommitDate: //p'`
+git_checkout_date=`PAGER= git log -n 1 --format=%ci`
+if [ -z "$git_checkout_date" ] ; then
+ git_checkout_date=@${SOURCE_DATE_EPOCH:-`date +%s`}
+fi
pretty_date=`LC_ALL=C date +"%e %B %Y" --date="$git_checkout_date"`
func_echo "Generated by <CODE>MODULES.html.sh</CODE> from a git checkout as of
${pretty_date}."
--
2.16.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] MODULES.html.sh: handle tarball builds,
Bernhard M. Wiedemann <=