From 1f373fe38ce1e2ff67e5b2b0c602c45a26202945 Mon Sep 17 00:00:00 2001 From: Joakim Olsson Date: Wed, 27 Nov 2024 15:09:37 +0100 Subject: [PATCH] fix(ci): improve version checking in the CI pipeline Update the version checking logic in the CI pipeline to ensure that the script correctly identifies the latest tag. The change checks if the latest tag is available before comparing it with the VERSION file, improving reliability in determining if a version bump is necessary. --- Release.gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Release.gitlab-ci.yml b/Release.gitlab-ci.yml index 0bc4bb2..ae63e1a 100644 --- a/Release.gitlab-ci.yml +++ b/Release.gitlab-ci.yml @@ -52,7 +52,8 @@ unbound_release_handle_mr: - 'apk add --no-cache git jq curl' script: - | - if [[ "$(cat VERSION)" == "$(git describe --abbrev=0 --tags)" ]]; then + LATEST="$(git describe --abbrev=0 --tags 2>/dev/null)" + if [[ -n "${LATEST}" && "$(cat VERSION)" == "${LATEST}" ]]; then echo "No changes worthy of a version bump" exit 0 fi