mirror of
https://github.com/PaulHatch/semantic-version.git
synced 2026-04-15 19:39:53 +00:00
Exclude pre-release tags from version consideration
This commit is contained in:
parent
ba6e71e658
commit
02763ed6d3
8 changed files with 74 additions and 10 deletions
|
|
@ -42,5 +42,11 @@ class DefaultTagFormatter {
|
|||
return [major, minor, patch];
|
||||
}
|
||||
;
|
||||
IsValid(tag) {
|
||||
if (!!this.namespace) {
|
||||
return new RegExp(`^${this.tagPrefix}[0-9]+.[0-9]+.[0-9]+${this.namespaceSeperator}${this.namespace}$`).test(tag);
|
||||
}
|
||||
return new RegExp(`^${this.tagPrefix}[0-9]+.[0-9]+.[0-9]+$`).test(tag);
|
||||
}
|
||||
}
|
||||
exports.DefaultTagFormatter = DefaultTagFormatter;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue