From aee5fb0aca965c350e2c84dbd48a16d665e99712 Mon Sep 17 00:00:00 2001 From: Bauke Date: Wed, 20 Jun 2018 13:45:26 +0200 Subject: [PATCH] Make bump reset lower version number to 0 in certain cases --- bump.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bump.js b/bump.js index c30c04c..1bd218c 100644 --- a/bump.js +++ b/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}`