diff options
author | 6543 <6543@obermui.de> | 2020-09-06 02:44:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-05 20:44:34 -0400 |
commit | f10d3ea803548ebefee3158c708a7b3b0129176a (patch) | |
tree | 37ec0d12c01a17e2d6f88cbed7a9d8b7736a98c8 /vendor/github.com/hashicorp | |
parent | 67ec27150ecf7f55c8eff41cd4b327d5ce866235 (diff) | |
download | gitea-f10d3ea803548ebefee3158c708a7b3b0129176a.tar.gz gitea-f10d3ea803548ebefee3158c708a7b3b0129176a.zip |
[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>
Diffstat (limited to 'vendor/github.com/hashicorp')
-rw-r--r-- | vendor/github.com/hashicorp/go-version/go.mod | 2 | ||||
-rw-r--r-- | vendor/github.com/hashicorp/go-version/version.go | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/vendor/github.com/hashicorp/go-version/go.mod b/vendor/github.com/hashicorp/go-version/go.mod index f5285555fa..f52ad8ac52 100644 --- a/vendor/github.com/hashicorp/go-version/go.mod +++ b/vendor/github.com/hashicorp/go-version/go.mod @@ -1 +1 @@ -module github.com/hashicorp/go-version +module github.com/6543/go-version diff --git a/vendor/github.com/hashicorp/go-version/version.go b/vendor/github.com/hashicorp/go-version/version.go index 09703e8e6f..1d96a6f71b 100644 --- a/vendor/github.com/hashicorp/go-version/version.go +++ b/vendor/github.com/hashicorp/go-version/version.go @@ -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 |