From: Saj Goonatilleke Date: Thu, 27 Apr 2023 09:29:23 +0000 (+1000) Subject: templates: abort on fetch error X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=04d4ef69570649aae27ae4f35cb07d7e1ea572bf;p=discourse_docker.git templates: abort on fetch error --- diff --git a/templates/web.template.yml b/templates/web.template.yml index e37d0d9..99965a8 100644 --- a/templates/web.template.yml +++ b/templates/web.template.yml @@ -91,6 +91,7 @@ run: # TODO Remove the special handling of shallow clones when everyone uses images without that clone type - |- sudo -H -E -u discourse bash -c ' + set -o errexit if [ $(git rev-parse --is-shallow-repository) == "true" ]; then git remote set-branches --add origin main git remote set-branches origin $version @@ -101,6 +102,7 @@ run: ' - |- sudo -H -E -u discourse bash -c ' + set -o errexit if [[ $(git symbolic-ref --short HEAD) == $version ]] ; then git pull else