Skip to content

Commit

Permalink
Semver fix (#11)
Browse files Browse the repository at this point in the history
* semver fix

* semver fix
  • Loading branch information
raghavharness authored Feb 28, 2023
1 parent a1502cc commit e02958f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cloner/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
var (
sha1 = regexp.MustCompile("^([a-f0-9]{40})$")
sha256 = regexp.MustCompile("^([a-f0-9]{64})$")
semver = regexp.MustCompile(`^v?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`)
semver = regexp.MustCompile(`^v?((([0-9]+)(?:\.([0-9]+))?(?:\.([0-9]+))?(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)$`)
)

// helper function returns true if the string is a commit hash.
Expand Down

0 comments on commit e02958f

Please sign in to comment.