web-logbook/build-and-deploy.sh

16 lines
566 B
Bash
Raw Normal View History

#!/usr/bin/env bash
2023-07-28 19:10:45 +00:00
# Build and deploy script for deploying this service to my VPS. Note that
# you'll need SSH authentication to run this.
# I just include it here for ease of use.
dub clean
rm -f web-logbook
2023-07-28 19:10:45 +00:00
dub build --build=release --compiler=/opt/ldc2/ldc2-1.33.0-linux-x86_64/bin/ldc2
echo "Stopping web-logbook service."
ssh -f root@andrewlalis.com 'systemctl stop web-logbook'
echo "Uploading new binary."
scp web-logbook root@andrewlalis.com:/opt/web-logbook/
echo "Starting web-logbook service."
ssh -f root@andrewlalis.com 'systemctl start web-logbook'