File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -47,14 +47,13 @@ try {
4747 : `0.alpha.${ getCommitNum ( ) } ` ;
4848
4949 newVersion = `${ intermediateVersion } ${ isStable ? '-' : '.' } ${ suffix } ` ;
50-
51- if ( ! versionParser . isGreater ( newVersion , latestVersion ) ) {
52- throw new Error ( `New version "${ newVersion } " is not > than latest version "${ latestVersion } " on this branch.` ) ;
53- }
5450 } else {
5551 throw new Error ( 'Unsupported travis mode: ' + TRAVIS_MODE ) ;
5652 }
5753
54+ if ( ! versionParser . isGreaterOrEqual ( newVersion , latestVersion ) ) {
55+ throw new Error ( `New version "${ newVersion } " is not >= latest version "${ latestVersion } " on this branch.` ) ;
56+ }
5857 packageJson . version = newVersion ;
5958 fs . writeFileSync ( './package.json' , JSON . stringify ( packageJson ) ) ;
6059 console . log ( 'Set version: ' + newVersion ) ;
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ module.exports = {
1919 }
2020 return newVersion ;
2121 } ,
22- isGreater : ( newVersion , previousVersion ) => {
23- return semver . gt ( newVersion , previousVersion ) ;
22+ isGreaterOrEqual : ( newVersion , previousVersion ) => {
23+ return semver . gte ( newVersion , previousVersion ) ;
2424 } ,
2525 // returns true if the provided version is definitely greater than any existing
2626 // auto generated alpha versions
You can’t perform that action at this time.
0 commit comments