fix: cross platform regex
parent
202e87933b
commit
1f52cdf40b
|
|
@ -6159,11 +6159,13 @@ class Versioning {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Whether the current tree has any version tags yet.
|
* Whether the current tree has any version tags yet.
|
||||||
|
*
|
||||||
|
* Note: Currently this is run in all OSes, so the syntax must be cross-platform.
|
||||||
*/
|
*/
|
||||||
static hasAnyVersionTags() {
|
static hasAnyVersionTags() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const numberOfTagsAsString = 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 -E ^v?(\\d+\\.){0,2}\\d+[\\w\\-.+]* | wc -l`),
|
input: Buffer.from(`git tag --list --merged HEAD | grep -E '^v?([0-9]+\\.)*[0-9]+.*' | wc -l`),
|
||||||
cwd: this.projectPath,
|
cwd: this.projectPath,
|
||||||
silent: false,
|
silent: false,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -273,10 +273,12 @@ export default class Versioning {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the current tree has any version tags yet.
|
* Whether the current tree has any version tags yet.
|
||||||
|
*
|
||||||
|
* Note: Currently this is run in all OSes, so the syntax must be cross-platform.
|
||||||
*/
|
*/
|
||||||
static async hasAnyVersionTags() {
|
static async hasAnyVersionTags() {
|
||||||
const numberOfTagsAsString = await System.run('sh', undefined, {
|
const numberOfTagsAsString = await System.run('sh', undefined, {
|
||||||
input: Buffer.from(`git tag --list --merged HEAD | grep -E ^v?(\\d+\\.){0,2}\\d+[\\w\\-.+]* | wc -l`),
|
input: Buffer.from(`git tag --list --merged HEAD | grep -E '^v?([0-9]+\\.)*[0-9]+.*' | wc -l`),
|
||||||
cwd: this.projectPath,
|
cwd: this.projectPath,
|
||||||
silent: false,
|
silent: false,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue