Added a better way to get the last tag
This commit is contained in:
@@ -13,7 +13,7 @@ runs:
|
|||||||
else
|
else
|
||||||
log_info "This is a branch push: $(yellow)${GITHUB_REF##refs/heads/}"
|
log_info "This is a branch push: $(yellow)${GITHUB_REF##refs/heads/}"
|
||||||
|
|
||||||
last_version="$(git describe --tags --match "v*" --abbrev=0 || echo "")"
|
last_version="$(git -c 'versionsort.suffix=-' ls-remote --tags -q --refs --sort '-v:refname' | head -n 1 | cut -d "/" -f3)"
|
||||||
if [[ -z "$last_version" ]]; then
|
if [[ -z "$last_version" ]]; then
|
||||||
last_version="v0.0.0"
|
last_version="v0.0.0"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user