Start increment at zero (MAJOR)

This commit is contained in:
Paul Hatcherian 2019-12-05 20:33:10 -05:00
parent 09f8bac4f7
commit 22cfb4bc0f

View file

@ -54,18 +54,18 @@ async function run() {
let history = (await cmd('git', 'log', '--pretty="%s"', root, mainBranch)).split(eol);
patch++;
var increment = history.length;
var increment = history.length - 1;
for (var i = 0; i < history.length; i++) {
if (history[i].indexOf(majorPattern) !== -1) {
major++;
minor = 0;
patch = 0;
increment = i + 1;
increment = i;
break;
} else if (history[i].indexOf(minorPattern) !== -1) {
minor++;
patch = 0;
increment = i + 1;
increment = i;
break;
}
}