Skip to content

Commit eb0b2d2

Browse files
committed
brew CI: check RTOOLS_BRANCH for ci_matching_branch
Signed-off-by: Steve Peters <scpeters@intrinsic.ai>
1 parent a0d3516 commit eb0b2d2

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

jenkins-scripts/lib/project-default-devel-homebrew-amd64.bash

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,21 @@ echo '# END SECTION'
5959
if [[ -n "${ghprbSourceBranch}" ]] && \
6060
python3 ${SCRIPT_DIR}/tools/detect_ci_matching_branch.py "${ghprbSourceBranch}"
6161
then
62-
echo "# BEGIN SECTION: trying to checkout branch ${ghprbSourceBranch} from osrf/simulation"
62+
export CI_MATCHING_BRANCH=${ghprbSourceBranch}
63+
fi
64+
65+
if [[ -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'
6879
fi

0 commit comments

Comments
 (0)