From 2b709f61e022c5c92ecbbfc246007f56cbef948c Mon Sep 17 00:00:00 2001 From: Ben Sturmfels Date: Wed, 20 Mar 2024 14:18:59 +1100 Subject: [PATCH] Make bin/deploy abort if there's an error with `git push` For example, your push failed because there's upstream changes. --- bin/deploy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/deploy b/bin/deploy index 5720abe2..3650d866 100755 --- a/bin/deploy +++ b/bin/deploy @@ -1,9 +1,11 @@ #!/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