diff --git a/internal/model/const.go b/internal/model/const.go index 085ef8946..3fc1604f0 100644 --- a/internal/model/const.go +++ b/internal/model/const.go @@ -22,7 +22,7 @@ const ( SecondFactorMethodDuo = "mobile_push" ) -var reSemanticVersion = regexp.MustCompile(`^v?(?P\d+)\.(?P\d+)\.(?P\d+)(\-(?P[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*))?(\+(?P[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*))?$`) +var reSemanticVersion = regexp.MustCompile(`^v?(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)(?:-(?P(?: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[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`) const ( semverRegexpGroupPreRelease = "PreRelease"