Skip to content

Commit

Permalink
fix buf check (#11014)
Browse files Browse the repository at this point in the history
`SYSTEM_PULLREQUEST_TARGETBRANCH` is not defined on main builds.

CHANGELOG_BEGIN
CHANGELOG_END
  • Loading branch information
garyverhaegen-da committed Sep 24, 2021
1 parent abc3e66 commit 59ad995
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ci/check-protobuf-against-stable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ trap 'rm -rf ${BUF_IMAGE_TMPDIR}' EXIT
#
# SYSTEM_PULLREQUEST_TARGETBRANCH=main bash -x ci/check-protobuf-against-stable.sh
#
echo "The target branch is '${SYSTEM_PULLREQUEST_TARGETBRANCH}'."
TARGET="${SYSTEM_PULLREQUEST_TARGETBRANCH:-main}"
echo "The target branch is '${TARGET}'."

# For `main` and PRs targeting `main`, we simply check against the most recent
# stable tag.
Expand All @@ -38,7 +39,7 @@ echo "The target branch is '${SYSTEM_PULLREQUEST_TARGETBRANCH}'."
# they are built sequentially, so no conflicts are possible and the per-PR
# check is enough.
GIT_TAG_SCOPE=""
if [[ "${SYSTEM_PULLREQUEST_TARGETBRANCH}" =~ ${RELEASE_BRANCH_REGEX} ]]; then
if [[ "${TARGET}" =~ ${RELEASE_BRANCH_REGEX} ]]; then
GIT_TAG_SCOPE="--merged"
fi

Expand Down

0 comments on commit 59ad995

Please sign in to comment.