From 5e7ad8fbfca367b6eb062455467d2cc48cbdb9a6 Mon Sep 17 00:00:00 2001 From: Simon Marsh Date: Mon, 4 Jan 2021 11:46:14 +0000 Subject: [PATCH] Fail build script if hugo fails --- push.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/push.sh b/push.sh index 71220dd..a9e79ea 100755 --- a/push.sh +++ b/push.sh @@ -54,11 +54,16 @@ chmod 0600 .tmp/* ######################################################################## # generate the site - pushd site -hugo -popd +hugo +if [ $? ne 0 ] +then + echo "Hugo build failed" + exit 1 +fi + +popd ######################################################################## # and push to hosts