mirror of https://github.com/docker/cli.git
set default version from git
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
b099c9c9ee
commit
26b633d37b
|
@ -4,7 +4,7 @@ set -eu
|
||||||
TARGET=${TARGET:-"build"}
|
TARGET=${TARGET:-"build"}
|
||||||
|
|
||||||
PLATFORM=${PLATFORM:-}
|
PLATFORM=${PLATFORM:-}
|
||||||
VERSION=${VERSION:-"unknown-version"}
|
VERSION=${VERSION:-$(git describe --match 'v[0-9]*' --dirty='.m' --always --tags | sed 's/^v//' 2>/dev/null || echo "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 +"%Y-%m-%dT%H:%M:%SZ")}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue