diff --git a/ci/scripts/check_ccache.sh b/ci/scripts/check_ccache.sh index 834ba5f8b0..2350bd558d 100755 --- a/ci/scripts/check_ccache.sh +++ b/ci/scripts/check_ccache.sh @@ -57,17 +57,17 @@ check_ccache() { fi } -for BRANCH_NAME in ${BRANCH_NAMES} -do - if [[ "${BRANCH_NAME}" != "HEAD" ]];then - check_ccache ${BRANCH_NAME} - fi -done - if [[ -n "${CHANGE_BRANCH}" && "${BRANCH_NAME}" =~ "PR-" ]];then check_ccache ${CHANGE_BRANCH} check_ccache ${BRANCH_NAME} fi +for CURRENT_BRANCH in ${BRANCH_NAMES} +do + if [[ "${CURRENT_BRANCH}" != "HEAD" ]];then + check_ccache ${CURRENT_BRANCH} + fi +done + echo "could not download cache" && exit 1