blob: 2946fc82ba6b52be2eb57251b0b11a8dfcffce75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
USER=fnurk
HOST=samuelw.dev
BIN_DIR=/opt/tinygram/ # the directory where your binary should go
ASSET_DIR=/srv/tinygram/ # the directory where your asset dir should go
echo "generating templates"
templ generate
echo "building"
go build .
echo "syncing binary"
rsync --rsync-path 'sudo -u tinygram rsync' tinygram ${USER}@${HOST}:${BIN_DIR}
echo "syncing assets"
rsync --rsync-path 'sudo -u tinygram rsync' -r assets ${USER}@${HOST}:${ASSET_DIR}
echo "restarting service"
ssh ${USER}@${HOST} 'sudo systemctl restart tinygram.service'
exit 0
|