Skip to content

Commit

Permalink
fix version semver format
Browse files Browse the repository at this point in the history
  • Loading branch information
qishiyao authored and ysicing committed Aug 18, 2022
1 parent 693563f commit 0b655dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/internal/app/validator/field/regex.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ package field
import "regexp"

var (
versionRegexSemantic = regexp.MustCompile(`^\d+\.\d+\.\d+$`)
versionRegexSemantic = regexp.MustCompile(`^(?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<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`)
)

0 comments on commit 0b655dc

Please sign in to comment.