1
0
Fork 0
forked from forgejo/forgejo

[Vendor] Fix Version Compare Lib (#12735)

* switch to patched fork

* vendor

* reference upstream lib and use replace in go.mod

* reference upstream lib and use replace in go.mod

* Apply suggestions from code review

* vendor

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
6543 2020-09-06 02:44:34 +02:00 committed by GitHub
parent 67ec27150e
commit f10d3ea803
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 6 deletions

View file

@ -1 +1 @@
module github.com/hashicorp/go-version
module github.com/6543/go-version

View file

@ -18,9 +18,10 @@ var (
// The raw regular expression string used for testing the validity
// of a version.
const (
VersionRegexpRaw string = `v?([0-9]+(\.[0-9]+)*?)` +
VersionRegexpRaw string = `[vV]?([0-9]+(\.[0-9]+)*?)` +
`(-([0-9]+[0-9A-Za-z\-~]*(\.[0-9A-Za-z\-~]+)*)|(-?([A-Za-z\-~]+[0-9A-Za-z\-~]*(\.[0-9A-Za-z\-~]+)*)))?` +
`(\+([0-9A-Za-z\-~]+(\.[0-9A-Za-z\-~]+)*))?` +
`([\+\.\-~]g[0-9A-Fa-f]{10}$)?` +
`?`
// SemverRegexpRaw requires a separator between version and prerelease