From 6f3cf0414b32671c55a52f1a40f3944fca819f87 Mon Sep 17 00:00:00 2001 From: jwansek Date: Fri, 6 Jun 2025 14:40:53 +0100 Subject: Changed post-receive hook --- post-receive-hook.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/post-receive-hook.sh b/post-receive-hook.sh index 1b56595..f8902f3 100755 --- a/post-receive-hook.sh +++ b/post-receive-hook.sh @@ -1,3 +1,19 @@ +#!/usr/bin/env python3 + +# I know I have the extension of a bash file but secretly I am a python file +# Yes I know it will fuck up your linter +# Sadly we have to do it this way because once up on a time this actually was a bash file and we don't want to remake hundreds of symlinks + +import sys +import os + +(old, new, branch) = sys.stdin.read().split() +print("Old: '%s'" % old) +print("New: '%s'" % new) +print("Branch: '%s'" % branch) +print("Push to '%s' successful!" % os.getcwd().split(os.sep)[-2]) + #!/bin/sh -echo "Push successful!" \ No newline at end of file +#p=$(pwd) +#echo "Push '${p#/*/*/}' successful!" -- cgit v1.2.3