From 210e9e5fac68be41f03739ef2ff2534141902472 Mon Sep 17 00:00:00 2001 From: chaodaiG <45011425+chaodaiG@users.noreply.github.com> Date: Thu, 12 Mar 2020 10:46:41 -0700 Subject: [PATCH] Update test-infra for release hotfix (#139) --- Gopkg.lock | 4 ++-- vendor/knative.dev/test-infra/scripts/release.sh | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 24f69872..b8ac7250 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -1293,14 +1293,14 @@ [[projects]] branch = "master" - digest = "1:3d0c703375017dde28d1ee030d7f82ea838ab023841890ead18e91c8c9aded80" + digest = "1:e5bd21467544cbd14cb25553c5c78eb2e0e93baf9288a3c2ebaf1cf1fdb0c95f" name = "knative.dev/test-infra" packages = [ "scripts", "tools/dep-collector", ] pruneopts = "UT" - revision = "7a8eea898f66fc7cd5fec6bb7c0fa2a80eeb702e" + revision = "2104794c86f5029ce8720d5afc79fc1a330ce2f5" [[projects]] digest = "1:5fdf0517a870044f13def5f9f2dc75eb8cfb88baf7862eaf9884a06152f9391b" diff --git a/vendor/knative.dev/test-infra/scripts/release.sh b/vendor/knative.dev/test-infra/scripts/release.sh index 9c555777..d23c4c33 100755 --- a/vendor/knative.dev/test-infra/scripts/release.sh +++ b/vendor/knative.dev/test-infra/scripts/release.sh @@ -506,7 +506,13 @@ function main() { if [[ -n "${RELEASE_BRANCH}" && -z "${FROM_NIGHTLY_RELEASE}" && "${current_branch}" != "${RELEASE_BRANCH}" ]]; then setup_upstream setup_branch - git checkout upstream/"${RELEASE_BRANCH}" || abort "cannot checkout branch ${RELEASE_BRANCH}" + # When it runs in Prow, the origin is identical with upstream, and previous + # fetch already fetched release-* branches, so no need to `checkout -b` + if (( IS_PROW )); then + git checkout "${RELEASE_BRANCH}" || abort "cannot checkout branch ${RELEASE_BRANCH}" + else + git checkout -b "${RELEASE_BRANCH}" upstream/"${RELEASE_BRANCH}" || abort "cannot checkout branch ${RELEASE_BRANCH}" + fi # HACK HACK HACK # Rerun the release script from the release branch. Fixes https://github.com/knative/test-infra/issues/1262 ./hack/release.sh "$@"