mirror of
https://github.com/PaulHatch/semantic-version.git
synced 2025-12-27 04:58:17 +00:00
Start increment at zero (MAJOR)
This commit is contained in:
parent
09f8bac4f7
commit
22cfb4bc0f
1 changed files with 3 additions and 3 deletions
6
index.js
6
index.js
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue