File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,13 +57,24 @@ brew tap osrf/simulation
5757brew trust osrf/simulation
5858echo ' # END SECTION'
5959
60+ # check if github pull request source branch starts with ci_matching_branch/
6061if [[ -n " ${ghprbSourceBranch} " ]] && \
6162 python3 ${SCRIPT_DIR} /tools/detect_ci_matching_branch.py " ${ghprbSourceBranch} "
6263then
63- echo " # BEGIN SECTION: trying to checkout branch ${ghprbSourceBranch} from osrf/simulation"
64+ export CI_MATCHING_BRANCH=${ghprbSourceBranch}
65+ # otherwise check if release-tools branch starts with ci_matching_branch/
66+ elif [[ -n " ${RTOOLS_BRANCH} " ]] && \
67+ python3 ${SCRIPT_DIR} /tools/detect_ci_matching_branch.py " ${RTOOLS_BRANCH} "
68+ then
69+ export CI_MATCHING_BRANCH=${RTOOLS_BRANCH}
70+ fi
71+
72+ if [[ -n " ${CI_MATCHING_BRANCH} " ]]
73+ then
74+ echo " # BEGIN SECTION: trying to checkout branch ${CI_MATCHING_BRANCH} from osrf/simulation"
6475 pushd $( brew --repo osrf/simulation)
65- git fetch origin ${ghprbSourceBranch } || true
66- git checkout ${ghprbSourceBranch } || true
76+ git fetch origin ${CI_MATCHING_BRANCH } || true
77+ git checkout ${CI_MATCHING_BRANCH } || true
6778 popd
6879 echo ' # END SECTION'
6980fi
You can’t perform that action at this time.
0 commit comments