Skip to content

Commit 032a13a

Browse files
refactor: Fix release version logic for major and minor bumps
Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat>
1 parent 32cc068 commit 032a13a

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

scripts/create-new-release.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,19 @@ case "$SEMVER_SEGMENT_TO_BUMP" in
120120
;;
121121
esac
122122

123-
# AIDER HELP IS THIS RIGHT?
124-
NEW_SNAPSHOT="${NEW_MAJOR}.${NEW_MINOR}.${NEW_PATCH}-SNAPSHOT"
125123
case "$SEMVER_SEGMENT_TO_BUMP" in
126-
# if we're bumping a major or minor release, do the release for patch 0 now, then begin patch 1-SNAPSHOT
124+
# For MAJOR/MINOR bumps, release the .0 version and prepare the next patch snapshot
127125
"MAJOR"|"MINOR")
128-
CURRENT_RELEASE_VERSION=$NEW_SNAPSHOT
129-
NEW_PATCH=$((NEW_PATCH + 1))
126+
# Release version is the bumped version with patch 0
127+
CURRENT_RELEASE_VERSION="${NEW_MAJOR}.${NEW_MINOR}.0"
128+
# Next snapshot is patch 1
129+
NEW_SNAPSHOT="${NEW_MAJOR}.${NEW_MINOR}.1-SNAPSHOT"
130+
;;
131+
"PATCH")
132+
# For patch bumps, use the original logic
130133
NEW_SNAPSHOT="${NEW_MAJOR}.${NEW_MINOR}.${NEW_PATCH}-SNAPSHOT"
134+
;;
131135
esac
132-
# /AIDER
133136

134137
echo "New snapshot version: $NEW_SNAPSHOT"
135138

0 commit comments

Comments
 (0)