From 21edca28dd0e129c8bafeb2b6acc6f0544d57605 Mon Sep 17 00:00:00 2001 From: lemurianmage Date: Thu, 2 Jul 2026 16:53:34 +0200 Subject: epic fail --- post-receive | 11 +++++------ template.html | 1 - 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/post-receive b/post-receive index 18dedf6..0e92d44 100644 --- a/post-receive +++ b/post-receive @@ -5,18 +5,17 @@ TARGET="/var/www/htdocs/slimegirl.nexus" GIT_DIR="/var/www/pub/git/slimegirl.nexus" -tmpdir=$(mktemp -d) || exit 1 - cleanup() { rm -rf "$tmpdir"; } +trap cleanup EXIT + while read oldrev newrev ref; do - if [ "$ref" = "refs/head/master" ]; then - echo "!!deploying!!" + if [ "$ref" == "refs/heads/master" ]; then + tmpdir=$(mktemp -d) cd $tmpdir git --work-tree=. --git-dir="$GIT_DIR" checkout -f - gmake clean && gmake compress + gmake compress rsync -rcvP --delete out/ "$TARGET" fi done -trap cleanup EXIT diff --git a/template.html b/template.html index c59696f..4b5a719 100644 --- a/template.html +++ b/template.html @@ -19,7 +19,6 @@ / go up -
$body$
$for(javascript.split)$ -- cgit v1.2.3