Changeset - 2b709f61e022
[Not reviewed]
0 1 0
Ben Sturmfels (bsturmfels) - 1 month ago 2024-03-20 03:18:59
ben@sturm.com.au
Make bin/deploy abort if there's an error with `git push`

For example, your push failed because there's upstream changes.
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
bin/deploy
Show inline comments
 
#!/bin/sh
 

	
 
set -e  # Abort on failure
 

	
 
git push
 
ssh debian@hickory.sfconservancy.org 'bash -s' << EOF
 
set -x  # Show output
 
set -e  # Abort on failure
 
set -e
 
cd /var/www/website
 
sudo -u www-data git pull
 
export DJANGO_SETTINGS_MODULE=conservancy.settings.prod
0 comments (0 inline, 0 general)