From 468e8f10987567f47be791e5fa3c6b8e284215b6 Mon Sep 17 00:00:00 2001 From: codl Date: Mon, 7 Aug 2017 14:56:18 +0200 Subject: [PATCH] ah!!! --- tools/post-receive.example | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/post-receive.example b/tools/post-receive.example index 588d3ff..648f789 100644 --- a/tools/post-receive.example +++ b/tools/post-receive.example @@ -1,12 +1,14 @@ #!/bin/sh +export GIT_DIR=$(git rev-parse --absolute-git-dir) + while read old new refname; do branch=$(git rev-parse --abbrev-ref=strict ${refname}) if [[ $branch == "deploy" ]]; then + systemctl --user stop forget GIT_WORK_TREE='/home/codl/forget' git checkout -f deploy - export GIT_DIR ( cd /home/codl/forget source venv/bin/activate