Skip to content

Commit df91468

Browse files
author
Elie
committed
Fix version retrieve from build script
1 parent e9fe6b7 commit df91468

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ GIT_COMMIT=$(git rev-parse HEAD)
1414
GIT_DIRTY=$(test -n "`git status --porcelain`" && echo "-dev" || true)
1515

1616
# Retrieve
17-
VERSION=$(git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || git rev-parse --short HEAD)
17+
VERSION=$(git describe --exact-match 2>/dev/null || git rev-parse --short HEAD)
1818

1919
# Inject version number
2020
LD_FLAGS="-X github.com/cloudskiff/driftctl/pkg/version.version=${VERSION}"

0 commit comments

Comments
 (0)