1
Fork 0

Make bump reset lower version number to 0 in certain cases

This commit is contained in:
Bauke 2018-06-20 13:45:26 +02:00
parent 6779ace21e
commit aee5fb0aca
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 2 additions and 2 deletions

View File

@ -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}`