Skip to content

Commit 0cd6104

Browse files
authored
Fix python bumping to minor (#7131)
* fix handling of minor and major python bumps * fix bumping versions * fix alpha bump
1 parent 53b47af commit 0cd6104

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

buildutils/src/release-bump.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,16 @@ commander
128128
} else if (prev.indexOf('rc') !== -1) {
129129
pySpec = 'rc';
130130
}
131+
} else if (spec === 'major' || spec === 'minor') {
132+
if (prev.indexOf('a') !== -1) {
133+
pySpec = `${spec},beta`;
134+
} else if (prev.indexOf('b') !== -1) {
135+
pySpec = `${spec},rc`;
136+
} else if (prev.indexOf('rc') !== -1) {
137+
pySpec = `${spec},release`;
138+
} else {
139+
pySpec = `${spec},alpha`;
140+
}
131141
}
132142
utils.run(`hatch version ${pySpec}`);
133143

0 commit comments

Comments
 (0)