fix(ci): handle case where no tags are present in git

Modify the command to describe the latest tag to gracefully handle  
the scenario where no tags are available. This avoids potential  
errors in the script execution when the git repository is  
tagless, ensuring the CI pipeline runs smoothly under all  
circumstances.
This commit is contained in:
2024-11-27 15:16:53 +01:00
parent 1f373fe38c
commit 9a6f9f79d1
+1 -1
View File
@@ -52,7 +52,7 @@ unbound_release_handle_mr:
- 'apk add --no-cache git jq curl'
script:
- |
LATEST="$(git describe --abbrev=0 --tags 2>/dev/null)"
LATEST="$(git describe --abbrev=0 --tags 2>/dev/null || echo '')"
if [[ -n "${LATEST}" && "$(cat VERSION)" == "${LATEST}" ]]; then
echo "No changes worthy of a version bump"
exit 0