File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -183,13 +183,11 @@ async function planRelease(
183183 const pkg = project . workspacePackages [ packageName ] ;
184184 const versionSpecifier = releaseSpecification . packages [ packageName ] ;
185185 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 ;
191187
192188 if ( versionSpecifier instanceof SemVer ) {
189+ const comparison = versionSpecifier . compare ( currentVersion ) ;
190+
193191 if ( comparison === 0 ) {
194192 throw new Error (
195193 [
@@ -207,6 +205,10 @@ async function planRelease(
207205 ] . join ( '\n\n' ) ,
208206 ) ;
209207 }
208+
209+ newVersion = versionSpecifier ;
210+ } else {
211+ newVersion = new SemVer ( currentVersion . toString ( ) ) . inc ( versionSpecifier ) ;
210212 }
211213
212214 return {
You can’t perform that action at this time.
0 commit comments