summaryrefslogtreecommitdiff
path: root/internal/model/const.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/model/const.go')
-rw-r--r--internal/model/const.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/model/const.go b/internal/model/const.go
index 3df982a37..9ba272b87 100644
--- a/internal/model/const.go
+++ b/internal/model/const.go
@@ -22,7 +22,10 @@ const (
SecondFactorMethodDuo = "mobile_push"
)
-var reSemanticVersion = regexp.MustCompile(`^v?(?P<Major>0|[1-9]\d*)\.(?P<Minor>0|[1-9]\d*)\.(?P<Patch>0|[1-9]\d*)(?:-(?P<PreRelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P<Metadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`)
+var (
+ reSemanticVersion = regexp.MustCompile(`^v?(?P<Major>0|[1-9]\d*)\.(?P<Minor>0|[1-9]\d*)\.(?P<Patch>0|[1-9]\d*)(?:-(?P<PreRelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P<Metadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`)
+ reToken64 = regexp.MustCompile(`^[a-zA-Z0-9_.~+/=-]+$`)
+)
const (
semverRegexpGroupPreRelease = "PreRelease"