aboutsummaryrefslogtreecommitdiff
path: root/post-receive
diff options
context:
space:
mode:
authorlemurianmage <azureazure@disroot.org>2026-07-02 16:53:34 +0200
committerlemurianmage <azureazure@disroot.org>2026-07-02 16:53:34 +0200
commit21edca28dd0e129c8bafeb2b6acc6f0544d57605 (patch)
treecb08269e33bd2e0fa48ef8a667e6e187c8b78b38 /post-receive
parentd4779b549e51a2999a640747525c39f37f41b012 (diff)
downloadslimegirl.nexus-21edca28dd0e129c8bafeb2b6acc6f0544d57605.tar.gz
epic fail
Diffstat (limited to 'post-receive')
-rw-r--r--post-receive11
1 files changed, 5 insertions, 6 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