summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-09-06 02:44:34 +0200
committerGitHub <noreply@github.com>2020-09-05 20:44:34 -0400
commitf10d3ea803548ebefee3158c708a7b3b0129176a (patch)
tree37ec0d12c01a17e2d6f88cbed7a9d8b7736a98c8
parent67ec27150ecf7f55c8eff41cd4b327d5ce866235 (diff)
downloadgitea-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>
-rw-r--r--go.mod4
-rw-r--r--go.sum4
-rw-r--r--vendor/github.com/hashicorp/go-version/go.mod2
-rw-r--r--vendor/github.com/hashicorp/go-version/version.go3
-rw-r--r--vendor/modules.txt3
5 files changed, 10 insertions, 6 deletions
diff --git a/go.mod b/go.mod
index 7f6c3f0c84..07a8f8c200 100644
--- a/go.mod
+++ b/go.mod
@@ -51,7 +51,7 @@ require (
github.com/google/uuid v1.1.1
github.com/gorilla/context v1.1.1
github.com/hashicorp/go-retryablehttp v0.6.6 // indirect
- github.com/hashicorp/go-version v1.2.1
+ github.com/hashicorp/go-version v0.0.0-00010101000000-000000000000
github.com/huandu/xstrings v1.3.0
github.com/issue9/assert v1.3.2 // indirect
github.com/issue9/identicon v1.0.1
@@ -117,3 +117,5 @@ require (
xorm.io/builder v0.3.7
xorm.io/xorm v1.0.4
)
+
+replace github.com/hashicorp/go-version => github.com/6543/go-version v1.2.3
diff --git a/go.sum b/go.sum
index 4b48d4379a..2b11989e69 100644
--- a/go.sum
+++ b/go.sum
@@ -48,6 +48,8 @@ gitea.com/macaron/toolbox v0.0.0-20190822013122-05ff0fc766b7 h1:N9QFoeNsUXLhl14m
gitea.com/macaron/toolbox v0.0.0-20190822013122-05ff0fc766b7/go.mod h1:kgsbFPPS4P+acDYDOPDa3N4IWWOuDJt5/INKRUz7aks=
gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a h1:lSA0F4e9A2NcQSqGqTOXqu2aRi/XEQxDCBwM8yJtE6s=
gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:EXuID2Zs0pAQhH8yz+DNjUbjppKQzKFAn28TMYPB6IU=
+github.com/6543/go-version v1.2.3 h1:uF30BawMhoQLzqBeCwhFcWM6HVxlzMHe/zXbzJeKP+o=
+github.com/6543/go-version v1.2.3/go.mod h1:fcfWh4zkneEgGXe8JJptiGwp8l6JgJJgS7oTw6P83So=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
@@ -482,8 +484,6 @@ github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerX
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
-github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI=
-github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
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