mirror of https://github.com/docker/cli.git
set default version from git
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 26b633d37b
)
Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
parent
84cc7d87cc
commit
8bc4062fc0
|
@ -4,7 +4,7 @@ set -eu
|
|||
TARGET=${TARGET:-"build"}
|
||||
|
||||
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)}
|
||||
BUILDTIME=${BUILDTIME:-$(date -u +"%Y-%m-%dT%H:%M:%SZ")}
|
||||
|
||||
|
|
Loading…
Reference in New Issue