Fixes #242
parent
a3e783f430
commit
4838df6d1b
|
|
@ -2272,13 +2272,13 @@ class Versioning {
|
||||||
* Regex to parse version description into separate fields
|
* Regex to parse version description into separate fields
|
||||||
*/
|
*/
|
||||||
static get descriptionRegex1() {
|
static get descriptionRegex1() {
|
||||||
return /^v([\d.]+)-(\d+)-g(\w+)-?(\w+)*/g;
|
return /^v?([\d.]+)-(\d+)-g(\w+)-?(\w+)*/g;
|
||||||
}
|
}
|
||||||
static get descriptionRegex2() {
|
static get descriptionRegex2() {
|
||||||
return /^v([\d.]+-\w+)-(\d+)-g(\w+)-?(\w+)*/g;
|
return /^v?([\d.]+-\w+)-(\d+)-g(\w+)-?(\w+)*/g;
|
||||||
}
|
}
|
||||||
static get descriptionRegex3() {
|
static get descriptionRegex3() {
|
||||||
return /^v([\d.]+-\w+\.\d+)-(\d+)-g(\w+)-?(\w+)*/g;
|
return /^v?([\d.]+-\w+\.\d+)-(\d+)-g(\w+)-?(\w+)*/g;
|
||||||
}
|
}
|
||||||
static determineVersion(strategy, inputVersion) {
|
static determineVersion(strategy, inputVersion) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -125,6 +125,7 @@ describe('Versioning', () => {
|
||||||
'is happy with valid %s',
|
'is happy with valid %s',
|
||||||
(description) => {
|
(description) => {
|
||||||
expect(Versioning.descriptionRegex1.test(description)).toBeTruthy();
|
expect(Versioning.descriptionRegex1.test(description)).toBeTruthy();
|
||||||
|
expect(Versioning.descriptionRegex1.test(description?.slice(1))).toBeTruthy();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,15 +68,15 @@ export default class Versioning {
|
||||||
* Regex to parse version description into separate fields
|
* Regex to parse version description into separate fields
|
||||||
*/
|
*/
|
||||||
static get descriptionRegex1() {
|
static get descriptionRegex1() {
|
||||||
return /^v([\d.]+)-(\d+)-g(\w+)-?(\w+)*/g;
|
return /^v?([\d.]+)-(\d+)-g(\w+)-?(\w+)*/g;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get descriptionRegex2() {
|
static get descriptionRegex2() {
|
||||||
return /^v([\d.]+-\w+)-(\d+)-g(\w+)-?(\w+)*/g;
|
return /^v?([\d.]+-\w+)-(\d+)-g(\w+)-?(\w+)*/g;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get descriptionRegex3() {
|
static get descriptionRegex3() {
|
||||||
return /^v([\d.]+-\w+\.\d+)-(\d+)-g(\w+)-?(\w+)*/g;
|
return /^v?([\d.]+-\w+\.\d+)-(\d+)-g(\w+)-?(\w+)*/g;
|
||||||
}
|
}
|
||||||
|
|
||||||
static async determineVersion(strategy: string, inputVersion: string) {
|
static async determineVersion(strategy: string, inputVersion: string) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue