From bfb92d2d5cd241ba353006fde1e0bcc4a57b326a Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Thu, 23 Nov 2023 14:33:53 +0100 Subject: [PATCH] Don't assume the target branch is always "main" So we can make use of this in the systemd-stable repo too. --- integration/upstream-tests/test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integration/upstream-tests/test.sh b/integration/upstream-tests/test.sh index 32b740e..29cc441 100755 --- a/integration/upstream-tests/test.sh +++ b/integration/upstream-tests/test.sh @@ -18,9 +18,10 @@ if [[ -n "${PACKIT_TARGET_URL:-}" ]]; then # Install systemd's build dependencies, as some of the integration tests setup stuff # requires pkg-config files dnf builddep -y systemd - # If we're running in a pull request job, merge the remote branch into the current main git clone "$PACKIT_TARGET_URL" systemd cd systemd + git checkout "$PACKIT_TARGET_BRANCH" + # If we're running in a pull request job, merge the remote branch into the current main if [[ -n "${PACKIT_SOURCE_URL:-}" ]]; then git remote add pr "${PACKIT_SOURCE_URL:?}" git fetch pr "${PACKIT_SOURCE_BRANCH:?}"