Skip to content

Commit

Permalink
set default version from git
Browse files Browse the repository at this point in the history
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 26b633d)
Signed-off-by: Tibor Vass <tibor@docker.com>
  • Loading branch information
tonistiigi authored and Tibor Vass committed Apr 6, 2021
1 parent cccb4a0 commit 950a2f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/build/.variables
Original file line number Diff line number Diff line change
Expand Up @@ -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")}

Expand Down

0 comments on commit 950a2f4

Please sign in to comment.