aboutsummaryrefslogtreecommitdiff
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
parentd4779b549e51a2999a640747525c39f37f41b012 (diff)
downloadslimegirl.nexus-21edca28dd0e129c8bafeb2b6acc6f0544d57605.tar.gz
epic fail
-rw-r--r--post-receive11
-rw-r--r--template.html1
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 @@
/
<a href=".." id="go-up">go up</a>
</nav>
-
<article>$body$</article>
$for(javascript.split)$
<script src="$this.escapehtmlurl$"></script>