From f84dee72c0035d73b1f4ea983b40d56d4b8dec72 Mon Sep 17 00:00:00 2001 From: Christoph Hagen Date: Thu, 7 Sep 2023 16:10:27 +0200 Subject: [PATCH] Add build script --- build.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 build.sh diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..ab097cd --- /dev/null +++ b/build.sh @@ -0,0 +1,13 @@ +echo "[1/7] Stopping server..." +sudo supervisorctl stop schafkopf +echo "[2/7] Changing permissions..." +sudo chown -R pi:pi . +echo "[3/7] Pulling changes..." +git pull +echo "[4/7] Building project..." +swift build -c release +echo "[5/7] Restoring permissions..." +sudo chown -R www-data:www-data . +echo "[6/7] Starting server..." +sudo supervisorctl start schafkopf +echo "[7/7] Done"