Added a better way to get the last tag

This commit is contained in:
2024-12-25 19:12:23 +01:00
parent 064bd6b373
commit 933ce92ee5

View File

@@ -13,7 +13,7 @@ runs:
else
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
last_version="v0.0.0"
fi