Skip to content

Commit 0181d85

Browse files
committed
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.
1 parent d3f12e1 commit 0181d85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/packages.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ function _getVersionFromGit(experimental: boolean): string {
164164
}
165165

166166
const hasLocalChanges = _exec(`git status --porcelain`) != '';
167-
const scmVersionTagRaw = _exec(`git describe --match v[0-9].[0-9].[0-9]* --abbrev=7 --tags`)
167+
const scmVersionTagRaw = _exec(`git describe --match v[0-9]*.[0-9]*.[0-9]* --abbrev=7 --tags`)
168168
.slice(1);
169169
stableVersion = scmVersionTagRaw.replace(/-([0-9]+)-g/, '+$1.');
170170
if (hasLocalChanges) {

0 commit comments

Comments
 (0)