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 let newVersion
switch (incrementType) { switch (incrementType) {
case 'major': case 'major':
newVersion = `${bumped}.${oldVersion[1]}.${oldVersion[2]}` newVersion = `${bumped}.0.0}`
break break
case 'minor': case 'minor':
newVersion = `${oldVersion[0]}.${bumped}.${oldVersion[2]}` newVersion = `${oldVersion[0]}.${bumped}.0}`
break break
case 'patch': case 'patch':
newVersion = `${oldVersion[0]}.${oldVersion[1]}.${bumped}` newVersion = `${oldVersion[0]}.${oldVersion[1]}.${bumped}`