Skip to content

Commit 9d40c74

Browse files
committed
scripts/build/.variables: Support SOURCE_DATE_EPOCH
Repeated builds of docker is currently unreproducible as the embedded time does not support SOURCE_DATE_EPOCH. This patch ensures we check for the defined variable before utilizing current date. This has been fixed previously with manpages as well 2d7091a Signed-off-by: Morten Linderud <morten@linderud.pw>
1 parent 5836f20 commit 9d40c74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/build/.variables

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -eu
44
PLATFORM=${PLATFORM:-}
55
VERSION=${VERSION:-"unknown-version"}
66
GITCOMMIT=${GITCOMMIT:-$(git rev-parse --short HEAD 2> /dev/null || true)}
7-
BUILDTIME=${BUILDTIME:-$(date -u +"%Y-%m-%dT%H:%M:%SZ")}
7+
BUILDTIME=${BUILDTIME:-$(date -u --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +"%Y-%m-%dT%H:%M:%SZ")}
88

99
PLATFORM_LDFLAGS=
1010
if test -n "${PLATFORM}"; then

0 commit comments

Comments
 (0)