From d44daa263ff04e4b86a28afd49bfed196e78810d Mon Sep 17 00:00:00 2001 From: Matt Moore Date: Mon, 16 Mar 2020 15:17:31 -0700 Subject: [PATCH] Auto-update dependencies (#2298) Produced via: `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh` /assign dprotaso grantr samodell /cc dprotaso grantr samodell --- Gopkg.lock | 4 +-- .../knative.dev/test-infra/scripts/release.sh | 30 ++++++++++++++----- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 610985d46..1f768a098 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -465,14 +465,14 @@ [[projects]] branch = "master" - digest = "1:dd8432987142e8a917e58bac0137c287f54399fa68b0760936d52dce04eb639b" + digest = "1:e5bd21467544cbd14cb25553c5c78eb2e0e93baf9288a3c2ebaf1cf1fdb0c95f" name = "knative.dev/test-infra" packages = [ "scripts", "tools/dep-collector", ] pruneopts = "UT" - revision = "0c681e1f1df96322a62976d05d0add50bd50632e" + revision = "71f886c808ce483867a28ca2b47e843916a72b44" [solve-meta] analyzer-name = "dep" diff --git a/vendor/knative.dev/test-infra/scripts/release.sh b/vendor/knative.dev/test-infra/scripts/release.sh index 915fc97f6..d23c4c33b 100755 --- a/vendor/knative.dev/test-infra/scripts/release.sh +++ b/vendor/knative.dev/test-infra/scripts/release.sh @@ -498,9 +498,30 @@ function publish_artifacts() { # Entry point for a release script. function main() { + parse_flags "$@" + + # Checkout specific branch, if necessary + local current_branch + current_branch="$(git rev-parse --abbrev-ref HEAD)" + if [[ -n "${RELEASE_BRANCH}" && -z "${FROM_NIGHTLY_RELEASE}" && "${current_branch}" != "${RELEASE_BRANCH}" ]]; then + setup_upstream + setup_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 "$@" + exit "$?" + fi + function_exists build_release || abort "function 'build_release()' not defined" [[ -x ${VALIDATION_TESTS} ]] || abort "test script '${VALIDATION_TESTS}' doesn't exist" - parse_flags "$@" + # Log what will be done and where. banner "Release configuration" if which gcloud &>/dev/null ; then @@ -533,13 +554,6 @@ function main() { fi [[ -n "${RELEASE_NOTES}" ]] && echo "- Release notes are generated from '${RELEASE_NOTES}'" - # Checkout specific branch, if necessary - if [[ -n "${RELEASE_BRANCH}" && -z "${FROM_NIGHTLY_RELEASE}" ]]; then - setup_upstream - setup_branch - git checkout upstream/${RELEASE_BRANCH} || abort "cannot checkout branch ${RELEASE_BRANCH}" - fi - if [[ -n "${FROM_NIGHTLY_RELEASE}" ]]; then build_from_nightly_release else