From 0181d8538f35abbc410780557910ff41a8d31605 Mon Sep 17 00:00:00 2001 From: mgechev Date: Wed, 8 Apr 2020 12:35:51 -0700 Subject: [PATCH] build: version from git tag which consists two or more digits Currently, we can't publish v10 because the `--match` pattern in describe can't match the tag `v10.0.0`. The new glob has the following semantics: ``` v[0-9]*.[0-9]*.[0-9]* ``` Couldn't make it stricter because didn't find an easy way to enable extglobs for git for everyone. --- lib/packages.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/packages.ts b/lib/packages.ts index c45a298fdd..09ab1e719d 100644 --- a/lib/packages.ts +++ b/lib/packages.ts @@ -164,7 +164,7 @@ function _getVersionFromGit(experimental: boolean): string { } const hasLocalChanges = _exec(`git status --porcelain`) != ''; - const scmVersionTagRaw = _exec(`git describe --match v[0-9].[0-9].[0-9]* --abbrev=7 --tags`) + const scmVersionTagRaw = _exec(`git describe --match v[0-9]*.[0-9]*.[0-9]* --abbrev=7 --tags`) .slice(1); stableVersion = scmVersionTagRaw.replace(/-([0-9]+)-g/, '+$1.'); if (hasLocalChanges) {