aboutsummaryrefslogtreecommitdiff
path: root/internal/db
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-05-04 18:48:23 +0800
committerGitHub <noreply@github.com>2020-05-04 18:48:23 +0800
commit9fd4f5562d7a59abbef5e78d44fb85a0041e0733 (patch)
tree8b917bfbf8d2c7fb186e832f52f29b5942d43b12 /internal/db
parent9bb218734c53c98a13264c2f4f479e3633ccfe18 (diff)
all: use semver to compare versions (#6147)
Diffstat (limited to 'internal/db')
-rw-r--r--internal/db/repo.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/db/repo.go b/internal/db/repo.go
index 66cecdd3..9c91d90f 100644
--- a/internal/db/repo.go
+++ b/internal/db/repo.go
@@ -19,7 +19,6 @@ import (
"strings"
"time"
- "github.com/mcuadros/go-version"
"github.com/nfnt/resize"
"github.com/unknwon/cae/zip"
"github.com/unknwon/com"
@@ -37,6 +36,7 @@ import (
"gogs.io/gogs/internal/markup"
"gogs.io/gogs/internal/osutil"
"gogs.io/gogs/internal/process"
+ "gogs.io/gogs/internal/semverutil"
"gogs.io/gogs/internal/sync"
)
@@ -117,7 +117,7 @@ func NewRepoContext() {
}
log.Trace("Git version: %s", conf.Git.Version)
- if version.Compare("1.8.3", conf.Git.Version, ">") {
+ if semverutil.Compare(conf.Git.Version, "<", "1.8.3") {
log.Fatal("Gogs requires Git version greater or equal to 1.8.3")
}