-
Notifications
You must be signed in to change notification settings - Fork 42
Closed
Labels
enhancementNew feature or requestNew feature or requesttech/backendBack-end tools, code, infrastructureBack-end tools, code, infrastructuretoolsSoftware ToolsSoftware Tools
Milestone
Description
See https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
...which describes:
^(?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-]+)*))?$
We should implement a check at the init time of ssvc._mixins._Versioned that verifies this regex and throws an error if it is not matched.
Explainer: https://regex101.com/r/Ly7O1x/3/
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesttech/backendBack-end tools, code, infrastructureBack-end tools, code, infrastructuretoolsSoftware ToolsSoftware Tools