Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick #46 to focal: Try checking out ci_matching_branch for gzdev #47

Merged
merged 1 commit into from
Dec 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,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