aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-10-13 17:24:06 +0100
committerGitHub <noreply@github.com>2020-10-14 00:24:06 +0800
commit2d75d6f664316cb01c179e8b3d382f8966b3f2f7 (patch)
tree1328f5567d0a51549ae0e4685fce1a92729fffc5 /cmd
parentdaa393cb48507f34e7d2b81b5a92f8f94ebe3ad0 (diff)
downloadgitea-2d75d6f664316cb01c179e8b3d382f8966b3f2f7.tar.gz
gitea-2d75d6f664316cb01c179e8b3d382f8966b3f2f7.zip
Move update-server-info to hooks (#12826)
Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/hook.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/hook.go b/cmd/hook.go
index cc5289db6e..1fcc0a18c3 100644
--- a/cmd/hook.go
+++ b/cmd/hook.go
@@ -285,6 +285,12 @@ func runHookUpdate(c *cli.Context) error {
}
func runHookPostReceive(c *cli.Context) error {
+ // First of all run update-server-info no matter what
+ if _, err := git.NewCommand("update-server-info").Run(); err != nil {
+ return fmt.Errorf("Failed to call 'git update-server-info': %v", err)
+ }
+
+ // Now if we're an internal don't do anything else
if os.Getenv(models.EnvIsInternal) == "true" {
return nil
}