2 ms·
here's the deployment script i use most often http://canonical.org/~kragen/sw/dev3.git/hooks/post-update http://canonical.org/~kragen/sw/dev3.git/hooks/post-up
by kragen 3y ago
here's the deployment script i use most often
http://canonical.org/~kragen/sw/dev3.git/hooks/post-update http://canonical.org/~kragen/sw/dev3.git/hooks/post-update
#!/bin/sh
set -e
echo -n 'updating... '
git update-server-info
echo 'done. going to dev3'
cd /home/kragen/public_html/sw/dev3
echo -n 'pulling... '
env -u GIT_DIR git pull
echo -n 'updating... '
env -u GIT_DIR git update-server-info
echo 'done.'
dev3.git is the origin for dev3, so the `git pull` in there pulls from the bare repo that just got pushed to
it doesn't have the 60-second lag and it doesn't load the server all the time. it also doesn't run `go build` or restart a server with openrc, but those would be easy things to add if i wanted them