Skip to content

Commit 588ba92

Browse files
committed
Fix logic for finding the latest tag
On-behalf-of: @SAP [email protected] Signed-off-by: Marko Mudrinić <[email protected]>
1 parent b253f2f commit 588ba92

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

artifacts/scripts/util.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -909,11 +909,8 @@ gomod-pseudo-version() {
909909
# - origin: the published repository (e.g. github.com/kcp-dev/apimachinery)
910910
# - upstream: the local source repository (e.g. ../kcp)
911911
# We only consider tags from the published repository (origin).
912-
# Technically, we should never ever hit this case. That's because tags are synced
913-
# only after the initial publishing is done. We might eventually hit this case if
914-
# there are two different tags/versions on the same commit.
915912
if [[ -n "${commit_tag:-}" ]]; then
916-
commit_tag=$(echo "${commit_tag}" | grep 'origin\/v' | sed 's|^origin/||' | sort -V | tail -n1)
913+
commit_tag=$(echo "${commit_tag}" | grep -E 'v|origin\/v' | sed 's|^origin/||' | sort -V | tail -n1)
917914
echo "${commit_tag}"
918915
return
919916
fi

0 commit comments

Comments
 (0)