diff --git a/jenkins-scripts/lib/project-default-devel-homebrew-amd64.bash b/jenkins-scripts/lib/project-default-devel-homebrew-amd64.bash index dfc9fa6a4..8f57bf355 100644 --- a/jenkins-scripts/lib/project-default-devel-homebrew-amd64.bash +++ b/jenkins-scripts/lib/project-default-devel-homebrew-amd64.bash @@ -61,9 +61,14 @@ echo '# BEGIN SECTION: setup the osrf/simulation tap' brew tap osrf/simulation echo '# END SECTION' -if [[ -n "${PULL_REQUEST_URL}" ]]; then - echo "# BEGIN SECTION: pulling ${PULL_REQUEST_URL}" - brew pull ${PULL_REQUEST_URL} +if [[ -n "${ghprbSourceBranch}" ]] && \ + [[ "${ghprbSourceBranch}" =~ ci_matching_branch\/ ]] +then + echo "# BEGIN SECTION: trying to checkout branch ${ghprbSourceBranch} from osrf/simulation" + pushd $(brew --repo osrf/simulation) + git fetch origin ${ghprbSourceBranch} || true + git checkout ${ghprbSourceBranch} || true + popd echo '# END SECTION' fi