From dad194ae4e174504679b6c798f5d21116b432ae0 Mon Sep 17 00:00:00 2001 From: Joakim Olsson Date: Tue, 22 Oct 2024 11:11:12 +0200 Subject: [PATCH] fix: use latest if running on tag --- Release.gitlab-ci.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Release.gitlab-ci.yml b/Release.gitlab-ci.yml index 4db891e..8e9dd36 100644 --- a/Release.gitlab-ci.yml +++ b/Release.gitlab-ci.yml @@ -147,10 +147,15 @@ unbound_release_prepare_release: GIT_STRATEGY: clone # clone entire repo instead of reusing workspace GIT_DEPTH: 0 # avoid shallow clone to give cliff all the info it needs script: - - 'echo "Generating changelog"' - - 'git-cliff --bump --unreleased --strip header > CHANGES.md' - - 'echo "Bumping version"' - - 'git-cliff --bumped-version 2>/dev/null > VERSION' + - | + echo "Generating changelog" + if [ -n "${CI_COMMIT_TAG}" ]; then + git-cliff --bump --latest --strip header > CHANGES.md + else + git-cliff --bump --unreleased --strip header > CHANGES.md + fi + echo "Bumping version" + git-cliff --bumped-version 2>/dev/null > VERSION artifacts: paths: - CHANGES.md