DockerCLI/scripts
Sebastiaan van Stijn 8fd92f1866
scripts/build: make sure build-time is in UTC
Before this:

    SOURCE_DATE_EPOCH=1606660000 DISABLE_WARN_OUTSIDE_CONTAINER=1 make binary
    ...
    + go build -o build/docker-darwin-amd64 -tags ' osusergo pkcs11' -ldflags ' -w -X "github.com/docker/cli/cli/version.GitCommit=090dd58dc" -X "github.com/docker/cli/cli/version.BuildTime=2020-11-29T15:26:40Z" -X "github.com/docker/cli/cli/version.Version=20.10.2-590-g090dd58dc"' -buildmode=pie github.com/docker/cli/cmd/docker
    ...

    make -f docker.Makefile shell
    SOURCE_DATE_EPOCH=1606660000 make binary
    ...
    + go build -o build/docker-linux-amd64 -tags  -ldflags ' -w -X "github.com/docker/cli/cli/version.GitCommit=090dd58dc" -X "github.com/docker/cli/cli/version.BuildTime=2020-11-29T14:26:40Z" -X "github.com/docker/cli/cli/version.Version=20.10.0-dev"' github.com/docker/cli/cmd/docker
    ...

Notice that `version.BuildTime` is `2020-11-29T15:26:40Z` outside the container,
and `2020-11-29T14:26:40Z` inside.

After this:

    SOURCE_DATE_EPOCH=1606660000 DISABLE_WARN_OUTSIDE_CONTAINER=1 make binary
    ...
    + go build -o build/docker-darwin-amd64 -tags ' osusergo pkcs11' -ldflags ' -w -X "github.com/docker/cli/cli/version.GitCommit=090dd58dc" -X "github.com/docker/cli/cli/version.BuildTime=2020-11-29T14:26:40Z" -X "github.com/docker/cli/cli/version.Version=20.10.2-590-g090dd58dc.m"' -buildmode=pie github.com/docker/cli/cmd/docker
    ...

    make -f docker.Makefile shell
    SOURCE_DATE_EPOCH=1606660000 make binary
    ...
    + go build -o build/docker-linux-amd64 -tags  -ldflags ' -w -X "github.com/docker/cli/cli/version.GitCommit=090dd58dc" -X "github.com/docker/cli/cli/version.BuildTime=2020-11-29T14:26:40Z" -X "github.com/docker/cli/cli/version.Version=20.10.0-dev"' github.com/docker/cli/cmd/docker
    ...

Notice that `version.BuildTime` is `2020-11-29T14:26:40Z` both outside and inside
the container.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-06 11:30:55 +02:00
..
build scripts/build: make sure build-time is in UTC 2022-04-06 11:30:55 +02:00
docs validate manpages target 2022-02-25 17:11:17 +01:00
test/e2e update/remove various tests and options related to kubernetes support 2022-02-24 17:53:18 +01:00
vendor vendor dependencies with go1.17 2022-03-26 19:48:14 +01:00
warn-outside-container Use official shellcheck image 2019-02-26 15:10:38 +01:00