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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user