From 6e164abae968510099f359279d4c6f0b4e86cdf8 Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Date: Tue, 7 Jan 2025 15:07:36 +0100 Subject: [PATCH] increment patch version on dev --- CHANGELOG.md | 1 - scripts/changelog.sh | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a5317676242..ff9429347402 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,5 @@ ## 1.11.0 (Unreleased) - ENHANCEMENTS: * `init`: Provider installation will utilise credentials configured in a `.netrc` file for the download and shasum URLs returned by provider registries. ([#35843](https://github.com/hashicorp/terraform/issues/35843)) diff --git a/scripts/changelog.sh b/scripts/changelog.sh index 28cc4b1ea6b0..43a8f3654dcf 100755 --- a/scripts/changelog.sh +++ b/scripts/changelog.sh @@ -6,6 +6,7 @@ set -uo pipefail CHANGIE_VERSION="${CHANGIE_VERSION:-1.21.0}" +SEMVER_VERSION="${SEMVER_VERSION:-7.6.3}" function usage { cat <<-'EOF' @@ -45,6 +46,11 @@ function generate { LATEST_VERSION=$(npx -y changie@$CHANGIE_VERSION latest -r --skip-prereleases) COMPLETE_VERSION="$LATEST_VERSION-dev" + # Check if we already released this version already + if git tag -l "v$LATEST_VERSION" | grep -q "v$LATEST_VERSION"; then + LATEST_VERSION=$(npx -y semver@$SEMVER_VERSION -i patch $LATEST_VERSION) + fi + npx -y changie@$CHANGIE_VERSION merge -u "## $LATEST_VERSION (Unreleased)" # If we have no changes yet, the changelog is empty now, so we need to add a header