Caps-Server/update.sh
2023-05-07 17:21:48 +02:00

16 lines
428 B
Bash

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"