aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/hook.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-04-29 19:08:21 +0100
committertechknowlogick <techknowlogick@gitea.io>2019-04-29 14:08:21 -0400
commit8d0d7bc28d517acc9ca98f0468d7ff2a4fdaf139 (patch)
tree0a8817abd2512ca2ebccfd4e5dc08814933aad2b /cmd/hook.go
parentccf4783980effa871abaecd70d0f983c5062a187 (diff)
downloadgitea-8d0d7bc28d517acc9ca98f0468d7ff2a4fdaf139.tar.gz
gitea-8d0d7bc28d517acc9ca98f0468d7ff2a4fdaf139.zip
Make CustomPath, CustomConf and AppWorkPath configurable at build (#6631)
Diffstat (limited to 'cmd/hook.go')
-rw-r--r--cmd/hook.go26
1 files changed, 0 insertions, 26 deletions
diff --git a/cmd/hook.go b/cmd/hook.go
index 88e61c61d1..46f97d5542 100644
--- a/cmd/hook.go
+++ b/cmd/hook.go
@@ -16,7 +16,6 @@ import (
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/private"
- "code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/util"
"github.com/urfave/cli"
@@ -28,13 +27,6 @@ var (
Name: "hook",
Usage: "Delegate commands to corresponding Git hooks",
Description: "This should only be called by Git",
- Flags: []cli.Flag{
- cli.StringFlag{
- Name: "config, c",
- Value: "custom/conf/app.ini",
- Usage: "Custom configuration file path",
- },
- },
Subcommands: []cli.Command{
subcmdHookPreReceive,
subcmdHookUpdate,
@@ -67,12 +59,6 @@ func runHookPreReceive(c *cli.Context) error {
return nil
}
- if c.IsSet("config") {
- setting.CustomConf = c.String("config")
- } else if c.GlobalIsSet("config") {
- setting.CustomConf = c.GlobalString("config")
- }
-
setup("hooks/pre-receive.log")
// the environment setted on serv command
@@ -143,12 +129,6 @@ func runHookUpdate(c *cli.Context) error {
return nil
}
- if c.IsSet("config") {
- setting.CustomConf = c.String("config")
- } else if c.GlobalIsSet("config") {
- setting.CustomConf = c.GlobalString("config")
- }
-
setup("hooks/update.log")
return nil
@@ -159,12 +139,6 @@ func runHookPostReceive(c *cli.Context) error {
return nil
}
- if c.IsSet("config") {
- setting.CustomConf = c.String("config")
- } else if c.GlobalIsSet("config") {
- setting.CustomConf = c.GlobalString("config")
- }
-
setup("hooks/post-receive.log")
// the environment setted on serv command