File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -183,13 +183,11 @@ async function planRelease(
183
183
const pkg = project . workspacePackages [ packageName ] ;
184
184
const versionSpecifier = releaseSpecification . packages [ packageName ] ;
185
185
const currentVersion = pkg . manifest . version ;
186
- const newVersion =
187
- versionSpecifier instanceof SemVer
188
- ? versionSpecifier
189
- : new SemVer ( currentVersion . toString ( ) ) . inc ( versionSpecifier ) ;
190
- const comparison = newVersion . compare ( currentVersion ) ;
186
+ let newVersion : SemVer ;
191
187
192
188
if ( versionSpecifier instanceof SemVer ) {
189
+ const comparison = versionSpecifier . compare ( currentVersion ) ;
190
+
193
191
if ( comparison === 0 ) {
194
192
throw new Error (
195
193
[
@@ -207,6 +205,10 @@ async function planRelease(
207
205
] . join ( '\n\n' ) ,
208
206
) ;
209
207
}
208
+
209
+ newVersion = versionSpecifier ;
210
+ } else {
211
+ newVersion = new SemVer ( currentVersion . toString ( ) ) . inc ( versionSpecifier ) ;
210
212
}
211
213
212
214
return {
You can’t perform that action at this time.
0 commit comments