conf: overhaul server settings (#5928)

* conf: rename package

* Requires Go 1.12

* Fix lint

* Fix lint

* Overhaul

* db: fix tests

* Save my work

* Fix tests

* Server.UnixSocketPermission

* Server.LocalRootURL

* SSH settings

* Server.OfflineMode

* Save my work

* App.Version

* Remove [server] STATIC_ROOT_PATH

* Server.LandingURL
This commit is contained in:
ᴜɴᴋɴᴡᴏɴ
2020-02-22 09:05:26 +08:00
committed by GitHub
parent 5b14cc6f0b
commit 648d9e253c
102 changed files with 1464 additions and 1329 deletions

10
gogs.go
View File

@@ -1,4 +1,4 @@
// +build go1.11
// +build go1.12
// Copyright 2014 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
@@ -14,20 +14,18 @@ import (
log "unknwon.dev/clog/v2"
"gogs.io/gogs/internal/cmd"
"gogs.io/gogs/internal/setting"
"gogs.io/gogs/internal/conf"
)
const Version = "0.12.0+dev"
func init() {
setting.AppVersion = Version
conf.App.Version = "0.12.0+dev"
}
func main() {
app := cli.NewApp()
app.Name = "Gogs"
app.Usage = "A painless self-hosted Git service"
app.Version = Version
app.Version = conf.App.Version
app.Commands = []cli.Command{
cmd.Web,
cmd.Serv,