From 9af3238644735991e76a92480117f1d8fcae3cb3 Mon Sep 17 00:00:00 2001 From: George Miller Date: Thu, 4 Aug 2022 14:30:06 -0400 Subject: git pull error check added a check to abort the script if the pull failed. --- scripts/release.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/release.sh b/scripts/release.sh index d6ffc338f..fd66a86ea 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -75,8 +75,14 @@ else fi # Do a pull to make sure we are up to date. - git pull --ff + pull_response=$(git pull --ff) + # Check that the pull was successful If we did not get a response, then we know the pull failed. + if [ -z "$pull_response" ]; then + echo "git pull for automatic checkout has failed. Abort." + exit 0 + fi + # Now do the checkout git checkout $develop_branch -- cgit v1.2.1