diff options
-rwxr-xr-x | githooks/merchant/post-receive | 25 | ||||
-rwxr-xr-x | githooks/merchant/post-update | 8 |
2 files changed, 10 insertions, 23 deletions
diff --git a/githooks/merchant/post-receive b/githooks/merchant/post-receive index 77a817d..dac4c53 100755 --- a/githooks/merchant/post-receive +++ b/githooks/merchant/post-receive @@ -1,24 +1,3 @@ -#!/usr/bin/python3 - -import sys -import os - -lines = sys.stdin.readlines() - -updated = set() - -for line in lines: - try: - old, new, name = line.split() - except ValueError: - print("unexpected format") - os.exit(1) - updated.add(name) - -if "refs/heads/test" in updated: - ret = os.system("echo merchant | timeout 1s tee /home/test/rebuild >/dev/null") - if ret != 0: - print("merchant update failed") - else: - print("updating merchant") +#!/bin/sh +exec git update-server-info diff --git a/githooks/merchant/post-update b/githooks/merchant/post-update new file mode 100755 index 0000000..ec17ec1 --- /dev/null +++ b/githooks/merchant/post-update @@ -0,0 +1,8 @@ +#!/bin/sh +# +# An example hook script to prepare a packed repository for use over +# dumb transports. +# +# To enable this hook, rename this file to "post-update". + +exec git update-server-info |