1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-05-11 05:55:29 +00:00

Move update-server-info to hooks (#12826)

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
zeripath
2020-10-13 17:24:06 +01:00
committed by GitHub
parent daa393cb48
commit 2d75d6f664
2 changed files with 6 additions and 4 deletions

View File

@ -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
}