Skip to content

Commit

Permalink
Fix empty version string for main branch without tags
Browse files Browse the repository at this point in the history
  • Loading branch information
PlagueCZ committed Jun 5, 2024
1 parent 78ad328 commit 8900dd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hack/get_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# For non-tagged commits, this is a simple "vX.X.X-XX-gXXXXXXX"
# For dpservice-bin tagged commits, this is "vX.X.X"
# For dpservice-go tagged commits, this is "go/dpservice-go/vX.X.X-XX-gXXXXXXX"
GITVER=$(git describe --tags)
GITVER=$(git describe --tags --always)

# The solution is to simply print the last item of an array created by splitting the Git version
ARRAY=(${GITVER//\// })
Expand Down

0 comments on commit 8900dd7

Please sign in to comment.