summaryrefslogtreecommitdiff
path: root/githooks/merchant/post-receive
blob: 54afab2a16edf5cdf84851021128fa0680d22a1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/python3

import sys
import os

lines = sys.stdin.readlines()

updated = {}

for line in lines:
    old, new, name = line.split()
    updated.add(name)

if "refs/heads/test" in updated:
    os.system("echo merchant | timeout 1s tee rebuild")
    print("updating merchant")