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