fix: use latest if running on tag

This commit is contained in:
2024-10-22 11:11:12 +02:00
parent ce06fd8ef6
commit dad194ae4e
+9 -4
View File
@@ -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