Skip to content

Commit c564ba0

Browse files
authored
Merge pull request #71 from cloudskiff/fix_make_build_keep_tag
Remove previous tag from version string in make build
2 parents 5405385 + ffdd0b5 commit c564ba0

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
@@ -15,7 +15,7 @@ GIT_COMMIT=$(git rev-parse HEAD)
1515
GIT_DIRTY=$(test -n "`git status --porcelain`" && echo "-dev" || true)
1616

1717
# Retrieve
18-
VERSION=$(git describe --tags 2>/dev/null || git rev-parse --short HEAD)
18+
VERSION=$(git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || git rev-parse --short HEAD)
1919

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

0 commit comments

Comments
 (0)