summaryrefslogtreecommitdiffstats
path: root/routers/admin/admin.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-09-05 18:42:58 +0200
committerGitHub <noreply@github.com>2020-09-05 12:42:58 -0400
commitbc11caff94896c8c3f9a5c970a77470ed9beb83a (patch)
tree75196365a23153cb7e9d13c368fa27d75b3aecfa /routers/admin/admin.go
parent9fdb4f887b65a6ddacefc8c7e4580e333d7e4b95 (diff)
downloadgitea-bc11caff94896c8c3f9a5c970a77470ed9beb83a.tar.gz
gitea-bc11caff94896c8c3f9a5c970a77470ed9beb83a.zip
[Vendor] Switch go-version lib (#12719)
* vendor: switch from "mcuadros/go-version" to "hashicorp/go-version" * Adapt P1 * simplify * fix lint * adapt * fix lint & rm old code * no deadlock * rm RWMutex and check GoVersion only 1-time * Copyright header Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'routers/admin/admin.go')
-rw-r--r--routers/admin/admin.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go
index f43c1e69c5..5dbc321e9d 100644
--- a/routers/admin/admin.go
+++ b/routers/admin/admin.go
@@ -243,7 +243,9 @@ func Config(ctx *context.Context) {
ctx.Data["DisableRouterLog"] = setting.DisableRouterLog
ctx.Data["RunUser"] = setting.RunUser
ctx.Data["RunMode"] = strings.Title(macaron.Env)
- ctx.Data["GitVersion"], _ = git.BinVersion()
+ if version, err := git.LocalVersion(); err == nil {
+ ctx.Data["GitVersion"] = version.Original()
+ }
ctx.Data["RepoRootPath"] = setting.RepoRootPath
ctx.Data["CustomRootPath"] = setting.CustomPath
ctx.Data["StaticRootPath"] = setting.StaticRootPath