diff --git a/update.sh b/update.sh new file mode 100644 index 0000000..ab26e07 --- /dev/null +++ b/update.sh @@ -0,0 +1,15 @@ +echo "[1/8] Stopping server..." +sudo supervisorctl stop caps +echo "[2/8] Changing permissions..." +sudo chown -R pi:pi . +echo "[3/8] Pulling changes..." +git pull +echo "[4/8] Updating dependencies..." +swift package update +echo "[5/8] Building project..." +swift build -c release +echo "[6/8] Restoring permissions..." +sudo chown -R www-data:www-data . +echo "[7/8] Starting server..." +sudo supervisorctl start caps +echo "[8/8] Done"