fix(core): update
This commit is contained in:
parent
cb589f5863
commit
ed87cdb101
13
ts/index.ts
13
ts/index.ts
@ -84,4 +84,17 @@ export class SmartVersion {
|
||||
const newInstance = new SmartVersion(`${this.semver.major + 1}.${this.semver.minor}.${this.semver.patch}`);
|
||||
return newInstance;
|
||||
}
|
||||
|
||||
public getNewVersion(typeArg: 'patch' | 'minor' | 'major') {
|
||||
switch (typeArg) {
|
||||
case 'patch':
|
||||
return this.getNewPatchVersion();
|
||||
case 'minor':
|
||||
return this.getNewMinorVersion();
|
||||
case 'major':
|
||||
return this.getNewMajorVersion();
|
||||
default:
|
||||
throw new Error('unknown new version type.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user