mirror of
https://github.com/ditkrg/project-version-check.git
synced 2026-01-25 07:16:42 +00:00
Remove substring
Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
This commit is contained in:
parent
3576662484
commit
51bac3bf73
2
index.js
2
index.js
@ -10,7 +10,7 @@ try {
|
|||||||
|
|
||||||
const version = require('./package.json').version;
|
const version = require('./package.json').version;
|
||||||
// the version is in semantic format, so we can split it by dot
|
// the version is in semantic format, so we can split it by dot
|
||||||
const versionParts = version.substring(1).split('.');
|
const versionParts = version.split('.');
|
||||||
if (label === 'major')
|
if (label === 'major')
|
||||||
versionParts[0] = parseInt(versionParts[0]) + 1;
|
versionParts[0] = parseInt(versionParts[0]) + 1;
|
||||||
else if (label == 'minor')
|
else if (label == 'minor')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user