Skip to content

Commit

Permalink
Try checking out ci_matching_branch for gzdev (#46)
Browse files Browse the repository at this point in the history
Code copied from release-tools#572

Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters committed Apr 6, 2022
1 parent 0e2ddfc commit df2395b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,16 @@ PACKAGE=$(echo "$GITHUB_REPOSITORY" | sed 's:.*/::' | sed 's:ign-:ignition-:')
wget https://raw.githubusercontent.com/ignition-tooling/release-tools/master/jenkins-scripts/tools/detect_cmake_major_version.py
PACKAGE_MAJOR_VERSION=$(python3 detect_cmake_major_version.py "$GITHUB_WORKSPACE"/CMakeLists.txt)

git clone --depth 1 https://github.com/osrf/gzdev /tmp/gzdev
# Check for ci_matching_branch in gzdev
wget https://raw.githubusercontent.com/ignition-tooling/release-tools/master/jenkins-scripts/tools/detect_ci_matching_branch.py
if python3 detect_ci_matching_branch.py "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"; then
GZDEV_TRY_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
fi

git clone https://github.com/osrf/gzdev /tmp/gzdev
if [ -n "${GZDEV_TRY_BRANCH}" ]; then
git -C /tmp/gzdev checkout ${GZDEV_TRY_BRANCH} || true
fi
pip3 install -r /tmp/gzdev/requirements.txt
/tmp/gzdev/gzdev.py \
repository enable --project="${PACKAGE}${PACKAGE_MAJOR_VERSION}"
Expand Down

0 comments on commit df2395b

Please sign in to comment.