]> source.dussan.org Git - gitea.git/commitdiff
Fixes #316
authorAntonio Facciolo <antonio.facciolo@ad-notam.com>
Wed, 30 Nov 2016 16:27:39 +0000 (17:27 +0100)
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>
Mon, 5 Dec 2016 11:25:45 +0000 (12:25 +0100)
Export Pusher name as GITEA_PUSHER_NAME env variable
Export also GITEA_UUID, but keep the uuid env variable for backward compatibility

export pusher name ENV variable #316

change env variable prefix to GITEA_

Signed-off-by: Antonio Facciolo <afdev82@gmail.com>
Export also GITEA_UUID #316

Keep uuid env variable for backward compatibility

cmd/serve.go
cmd/update.go

index 3ac29d7ec365b09163b15df649523ab3048a3e28..1d72b5c30fb0679fde3fe5ee93437449b1ee2aec 100644 (file)
@@ -258,7 +258,11 @@ func runServ(c *cli.Context) error {
                }
        }
 
+       os.Setenv("GITEA_PUSHER_NAME", user.Name)
+
        uuid := gouuid.NewV4().String()
+       os.Setenv("GITEA_UUID", uuid)
+       // Keep the old env variable name for backward compability
        os.Setenv("uuid", uuid)
 
        // Special handle for Windows.
index df20c223e9700b5e35fb86a79ed9a17882958d66..4bbab9a3aff4847096fc28a3d34b1dc9b854754a 100644 (file)
@@ -49,7 +49,7 @@ func runUpdate(c *cli.Context) error {
        }
 
        task := models.UpdateTask{
-               UUID:        os.Getenv("uuid"),
+               UUID:        os.Getenv("GITEA_UUID"),
                RefName:     args[0],
                OldCommitID: args[1],
                NewCommitID: args[2],