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 | |
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')
-rw-r--r-- | vendor/github.com/hashicorp/go-version/go.mod | 2 | ||||
-rw-r--r-- | vendor/github.com/hashicorp/go-version/version.go | 3 | ||||
-rw-r--r-- | vendor/modules.txt | 3 |
3 files changed, 5 insertions, 3 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 diff --git a/vendor/modules.txt b/vendor/modules.txt index 656eaf4403..69423a6975 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -423,7 +423,7 @@ github.com/hashicorp/go-cleanhttp # github.com/hashicorp/go-retryablehttp v0.6.6 ## explicit github.com/hashicorp/go-retryablehttp -# github.com/hashicorp/go-version v1.2.1 +# github.com/hashicorp/go-version v0.0.0-00010101000000-000000000000 => github.com/6543/go-version v1.2.3 ## explicit github.com/hashicorp/go-version # github.com/hashicorp/hcl v1.0.0 @@ -965,3 +965,4 @@ xorm.io/xorm/log xorm.io/xorm/names xorm.io/xorm/schemas xorm.io/xorm/tags +# github.com/hashicorp/go-version => github.com/6543/go-version v1.2.3 |