From 6cf07d1b2bb0efc6a13e663582498e8064fd2a6b Mon Sep 17 00:00:00 2001 From: Alvin Huang <17609145+alvin-huang@users.noreply.github.com> Date: Tue, 23 Jun 2020 18:37:20 -0400 Subject: [PATCH] remove set -e for cherry-pick script since we collect errors (#8177) --- .circleci/scripts/cherry-picker.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/scripts/cherry-picker.sh b/.circleci/scripts/cherry-picker.sh index 096b61d24..4c4241e2f 100755 --- a/.circleci/scripts/cherry-picker.sh +++ b/.circleci/scripts/cherry-picker.sh @@ -7,7 +7,7 @@ # Requires $CIRCLE_PROJECT_USERNAME, $CIRCLE_PROJECT_REPONAME, and $CIRCLE_SHA1 from CircleCI -set -e -o pipefail +set -o pipefail # colorized status prompt function status { @@ -135,17 +135,17 @@ for label in $labels; do status "backporting to stable-website" branch="stable-website" cherry_pick_with_slack_notification "$branch" "$CIRCLE_SHA1" "$pr_url" - (( backport_failures += "$?" )) + backport_failures=$((backport_failures + "$?")) # else if the label matches backport/*, it will attempt to cherry-pick to the release branch elif [[ $label =~ backport/* ]]; then status "backporting to $label" branch="${label/backport/release}.x" cherry_pick_with_slack_notification "$branch" "$CIRCLE_SHA1" "$pr_url" - (( backport_failures += "$?" )) + backport_failures=$((backport_failures + "$?")) fi done if [ "$backport_failures" -ne 0 ]; then echo "$backport_failures backports failed" - exit $backport_failures + exit 1 fi \ No newline at end of file