Skip to content

Commit 26b633d

Browse files
committed
set default version from git
Signed-off-by: Tonis Tiigi <[email protected]>
1 parent b099c9c commit 26b633d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/build/.variables

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -eu
44
TARGET=${TARGET:-"build"}
55

66
PLATFORM=${PLATFORM:-}
7-
VERSION=${VERSION:-"unknown-version"}
7+
VERSION=${VERSION:-$(git describe --match 'v[0-9]*' --dirty='.m' --always --tags | sed 's/^v//' 2>/dev/null || echo "unknown-version" )}
88
GITCOMMIT=${GITCOMMIT:-$(git rev-parse --short HEAD 2> /dev/null || true)}
99
BUILDTIME=${BUILDTIME:-$(date -u +"%Y-%m-%dT%H:%M:%SZ")}
1010

0 commit comments

Comments
 (0)