From d49e779e7ddec28f11aae6f1bebc5a26e5573b91 Mon Sep 17 00:00:00 2001 From: SyncFileContents Date: Fri, 3 Jan 2025 14:45:04 +1100 Subject: [PATCH] Sync scripts\make-changelog.ps1 --- scripts/make-changelog.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/make-changelog.ps1 b/scripts/make-changelog.ps1 index 72996ec..effa880 100644 --- a/scripts/make-changelog.ps1 +++ b/scripts/make-changelog.ps1 @@ -82,6 +82,12 @@ function MakeNotesForRange { $SEARCH_TAG = "$FROM_MAJOR_VERSION_NUMBER.0.0.0" } + # Handle the case where the version is the same but the prerelease number has been dropped + if ($TO_VERSION_MAJOR -eq $FROM_VERSION_MAJOR -and $TO_VERSION_MINOR -eq $FROM_VERSION_MINOR -and $TO_VERSION_PATCH -eq $FROM_VERSION_PATCH -and $TO_VERSION_PRERELEASE -eq "0" -and $FROM_VERSION_PRERELEASE -ne "0") { + $VERSION_TYPE = "patch" + $SEARCH_TAG = "$TO_VERSION_MAJOR.$TO_VERSION_MINOR.$FROM_PATCH_VERSION_NUMBER.0" + } + if ($SEARCH_TAG.Contains("-")) { $SEARCH_TAG = $FROM_TAG }