fix: make v character in version tags optional
parent
c068855899
commit
202e87933b
|
|
@ -6158,17 +6158,17 @@ class Versioning {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Whether or not the repository has any version tags yet.
|
* Whether the current tree has any version tags yet.
|
||||||
*/
|
*/
|
||||||
static hasAnyVersionTags() {
|
static hasAnyVersionTags() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const numberOfCommitsAsString = yield system_1.default.run('sh', undefined, {
|
const numberOfTagsAsString = yield system_1.default.run('sh', undefined, {
|
||||||
input: Buffer.from('git tag --list --merged HEAD | grep v[0-9]* | wc -l'),
|
input: Buffer.from(`git tag --list --merged HEAD | grep -E ^v?(\\d+\\.){0,2}\\d+[\\w\\-.+]* | wc -l`),
|
||||||
cwd: this.projectPath,
|
cwd: this.projectPath,
|
||||||
silent: false,
|
silent: false,
|
||||||
});
|
});
|
||||||
const numberOfCommits = Number.parseInt(numberOfCommitsAsString, 10);
|
const numberOfTags = Number.parseInt(numberOfTagsAsString, 10);
|
||||||
return numberOfCommits !== 0;
|
return numberOfTags !== 0;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -272,18 +272,18 @@ export default class Versioning {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether or not the repository has any version tags yet.
|
* Whether the current tree has any version tags yet.
|
||||||
*/
|
*/
|
||||||
static async hasAnyVersionTags() {
|
static async hasAnyVersionTags() {
|
||||||
const numberOfCommitsAsString = await System.run('sh', undefined, {
|
const numberOfTagsAsString = await System.run('sh', undefined, {
|
||||||
input: Buffer.from('git tag --list --merged HEAD | grep v[0-9]* | wc -l'),
|
input: Buffer.from(`git tag --list --merged HEAD | grep -E ^v?(\\d+\\.){0,2}\\d+[\\w\\-.+]* | wc -l`),
|
||||||
cwd: this.projectPath,
|
cwd: this.projectPath,
|
||||||
silent: false,
|
silent: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
const numberOfCommits = Number.parseInt(numberOfCommitsAsString, 10);
|
const numberOfTags = Number.parseInt(numberOfTagsAsString, 10);
|
||||||
|
|
||||||
return numberOfCommits !== 0;
|
return numberOfTags !== 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue