Make CustomPath, CustomConf and AppWorkPath configurable at build (#6631)

This commit is contained in:
zeripath
2019-04-29 19:08:21 +01:00
committed by techknowlogick
parent ccf4783980
commit 8d0d7bc28d
17 changed files with 184 additions and 193 deletions

View File

@ -30,11 +30,6 @@ var CmdDump = cli.Command{
It can be used for backup and capture Gitea server image to send to maintainer`,
Action: runDump,
Flags: []cli.Flag{
cli.StringFlag{
Name: "config, c",
Value: "custom/conf/app.ini",
Usage: "Custom configuration file path",
},
cli.StringFlag{
Name: "file, f",
Value: fmt.Sprintf("gitea-dump-%d.zip", time.Now().Unix()),
@ -61,9 +56,6 @@ It can be used for backup and capture Gitea server image to send to maintainer`,
}
func runDump(ctx *cli.Context) error {
if ctx.IsSet("config") {
setting.CustomConf = ctx.String("config")
}
setting.NewContext()
setting.NewServices() // cannot access session settings otherwise
models.LoadConfigs()