From 04d4ef69570649aae27ae4f35cb07d7e1ea572bf Mon Sep 17 00:00:00 2001 From: Saj Goonatilleke Date: Thu, 27 Apr 2023 19:29:23 +1000 Subject: [PATCH] templates: abort on fetch error --- templates/web.template.yml | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.25.1