File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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 || true) | grep ' origin\/v ' | sed ' s|^origin/|| ' | sort -V | tail -n1 ) "
892892
893893 # latest commit has a tag -> tag
894894 if [[ -n " ${commit_tag} " ]]; then
@@ -897,7 +897,7 @@ gomod-pseudo-version() {
897897 fi
898898
899899 local latest_tag
900- latest_tag=" $( git ls-remote --tags origin 2> /dev/null | awk -F/ ' {print $3}' | grep -E ' ^v[0-9]+(\.[0-9]+)*$ ' | sort -V | tail -n1) "
900+ latest_tag=" $( ( git ls-remote --tags origin 2> /dev/null || true) | awk -F/ ' {print $3}' | grep -v ' \^{} ' | grep ' v ' | sort -V | tail -n1) "
901901
902902 # tag does not exist at all -> v0.0.0-<timestamp>-<hash>
903903 if [[ -z " ${latest_tag:- } " ]]; then
You can’t perform that action at this time.
0 commit comments