mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-15 18:13:38 +08:00
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.
This commit is contained in:
parent
d3f12e1c74
commit
0181d8538f
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user