diff options
| author | lemurianmage <azureazure@disroot.org> | 2026-07-02 16:53:34 +0200 |
|---|---|---|
| committer | lemurianmage <azureazure@disroot.org> | 2026-07-02 16:53:34 +0200 |
| commit | 21edca28dd0e129c8bafeb2b6acc6f0544d57605 (patch) | |
| tree | cb08269e33bd2e0fa48ef8a667e6e187c8b78b38 /post-receive | |
| parent | d4779b549e51a2999a640747525c39f37f41b012 (diff) | |
| download | slimegirl.nexus-21edca28dd0e129c8bafeb2b6acc6f0544d57605.tar.gz | |
epic fail
Diffstat (limited to 'post-receive')
| -rw-r--r-- | post-receive | 11 |
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 |
