Make bump reset lower version number to 0 in certain cases
This commit is contained in:
parent
6779ace21e
commit
aee5fb0aca
4
bump.js
4
bump.js
|
@ -35,10 +35,10 @@ function bump(jsonPath, incrementType) {
|
|||
let newVersion
|
||||
switch (incrementType) {
|
||||
case 'major':
|
||||
newVersion = `${bumped}.${oldVersion[1]}.${oldVersion[2]}`
|
||||
newVersion = `${bumped}.0.0}`
|
||||
break
|
||||
case 'minor':
|
||||
newVersion = `${oldVersion[0]}.${bumped}.${oldVersion[2]}`
|
||||
newVersion = `${oldVersion[0]}.${bumped}.0}`
|
||||
break
|
||||
case 'patch':
|
||||
newVersion = `${oldVersion[0]}.${oldVersion[1]}.${bumped}`
|
||||
|
|
Loading…
Reference in New Issue