mirror of https://github.com/zulip/zulip.git
post-receive: Don't actually update servers on push to test-post-receive
Fixes #924. (imported from commit 85789b39ef2665901c8a7c9560ef072d80d5e24d)
This commit is contained in:
parent
b38a538f8c
commit
e8aec9d009
|
@ -39,14 +39,16 @@ def update_deployment(server, oldrev, newrev, refname):
|
|||
deployments = {
|
||||
'refs/heads/prod': ('humbughq.com', 'prod'),
|
||||
'refs/heads/master': ('staging.humbughq.com', 'master'),
|
||||
'refs/heads/test-post-receive': ('staging.humbughq.com', 'master'),
|
||||
'refs/heads/test-post-receive': None,
|
||||
}
|
||||
|
||||
for ln in sys.stdin:
|
||||
oldrev, newrev, refname = ln.strip().split()
|
||||
if refname in deployments:
|
||||
(server, branch) = deployments[refname]
|
||||
p = subprocess.Popen("/home/humbug/humbug/bots/githook-post-receive",
|
||||
stdin=subprocess.PIPE)
|
||||
p.communicate(input=ln)
|
||||
update_deployment(server, oldrev, newrev, "origin/" + branch)
|
||||
|
||||
if deployments[refname]:
|
||||
server, branch = deployments[refname]
|
||||
update_deployment(server, oldrev, newrev, "origin/" + branch)
|
||||
|
|
Loading…
Reference in New Issue