fix(core): update

This commit is contained in:
Philipp Kunz 2022-04-26 16:03:30 +02:00
parent cb589f5863
commit ed87cdb101

View File

@ -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.');
}
}
}