FAQ | This is a LIVE service | Changelog

Skip to content
Commits on Source (2)
......@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [4.5.1] - 2024-09-19
### Fixed
- `check-latest-tag-in-changelog.yml`: Update the grep/sed command to handle
cases where `release-it` does not create a link to a comparison in the
project's CHANGELOG.md (i.e. on the first entry in that file).
## [4.5.0] - 2024-08-13
### Added
......
......@@ -2,7 +2,7 @@
# Checks that the provided tag exists in the CHANGELOG as the latest version.
#
check_latest_tag_in_changelog:
check-latest-tag-in-changelog:
stage: test
script:
- changelog_file=""
......@@ -14,7 +14,7 @@ check_latest_tag_in_changelog:
echo "No CHANGELOG or CHANGELOG.md file found";
exit 1;
fi
- latest_changelog_version=$(grep -m 1 '^## \[[0-9]\+\.[0-9]\+\.[0-9]\+\(-[a-zA-Z0-9]\+\)\?\]' "$changelog_file" | sed 's/^## \[\(.*\)\].*/\1/')
- latest_changelog_version=$(grep -m 1 '^##\s\+\([0-9]\+\.[0-9]\+\.[0-9]\+\(-[a-zA-Z0-9]\+\)\?\)\|\(\[[0-9]\+\.[0-9]\+\.[0-9]\+\(-[a-zA-Z0-9]\+\)\?\]\)' "$changelog_file" | sed -r 's/^##[[:space:]]+\[?([.[:alnum:]]+)\]?.*/\1/')
- if [ "$latest_changelog_version" = "$CI_COMMIT_TAG" ]; then
echo "Tag $CI_COMMIT_TAG found in $changelog_file";
else
......@@ -24,4 +24,4 @@ check_latest_tag_in_changelog:
rules:
- if: $CHANGELOG_CHECK_DISABLED
when: never
- if: $CI_COMMIT_TAG
\ No newline at end of file
- if: $CI_COMMIT_TAG