Skip to content

Commit b7456cd

Browse files
committed
Fix getting the latest commit/tag
Signed-off-by: Marko Mudrinić <[email protected]>
1 parent a2992ce commit b7456cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

artifacts/scripts/util.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ gomod-pseudo-version() {
888888
commit_ts="$(TZ=UTC git show -s --date='format-local:%Y%m%d%H%M%S' --format=%cd HEAD)"
889889

890890
local commit_tag
891-
commit_tag="$(git describe --tags --exact-match --abbrev=0 2>/dev/null || true)"
891+
commit_tag="$(git tag --points-at HEAD 2>/dev/null | grep 'origin\/v' | sed 's|^origin/||' || true)"
892892

893893
# latest commit has a tag -> tag
894894
if [[ -n "${commit_tag}" ]]; then

0 commit comments

Comments
 (0)