From 7fdfb94c0744d3222eaeb6ebe1faeb1cdab48fd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 7 May 2020 14:26:58 +0200 Subject: [PATCH] MOBILE-3401 travis: Add exit errors --- scripts/mirror.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/mirror.sh b/scripts/mirror.sh index bd29e555b..1605b4688 100755 --- a/scripts/mirror.sh +++ b/scripts/mirror.sh @@ -60,12 +60,18 @@ if [ "$TRAVIS_BRANCH" == 'master' ]; then git commit -m 'Update licenses [ci skip]' git push origin HEAD:$TRAVIS_BRANCH + check_success_exit "Unsuccessful push, stopping..." fi if [ "$TRAVIS_BRANCH" == 'integration' ] || [ "$TRAVIS_BRANCH" == 'master' ] || [ "$TRAVIS_BRANCH" == 'desktop' ] ; then print_title "Mirror repository" git remote add mirror https://$GIT_TOKEN@github.com/$GIT_ORG_PRIVATE/moodleapp.git git fetch -q --unshallow mirror + check_success_exit "Unsuccessful fetch, stopping..." + git fetch -q --unshallow origin + check_success_exit "Unsuccessful fetch, stopping..." git push -f mirror HEAD:$TRAVIS_BRANCH + check_success_exit "Unsuccessful mirror, stopping..." git push -f mirror --tags + check_success_exit "Unsuccessful mirror tags, stopping..." fi