mirror of https://github.com/docker/cli.git
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
2d7091aaeb
Signed-off-by: Morten Linderud <morten@linderud.pw>
This commit is contained in:
parent
5836f20c28
commit
9d40c7464e
|
@ -4,7 +4,7 @@ set -eu
|
||||||
PLATFORM=${PLATFORM:-}
|
PLATFORM=${PLATFORM:-}
|
||||||
VERSION=${VERSION:-"unknown-version"}
|
VERSION=${VERSION:-"unknown-version"}
|
||||||
GITCOMMIT=${GITCOMMIT:-$(git rev-parse --short HEAD 2> /dev/null || true)}
|
GITCOMMIT=${GITCOMMIT:-$(git rev-parse --short HEAD 2> /dev/null || true)}
|
||||||
BUILDTIME=${BUILDTIME:-$(date -u +"%Y-%m-%dT%H:%M:%SZ")}
|
BUILDTIME=${BUILDTIME:-$(date -u --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +"%Y-%m-%dT%H:%M:%SZ")}
|
||||||
|
|
||||||
PLATFORM_LDFLAGS=
|
PLATFORM_LDFLAGS=
|
||||||
if test -n "${PLATFORM}"; then
|
if test -n "${PLATFORM}"; then
|
||||||
|
|
Loading…
Reference in New Issue