From 83899257cfcd863a40eb10e2c1d8dadeafb550e5 Mon Sep 17 00:00:00 2001 From: Knative Automation Date: Thu, 9 Nov 2023 21:55:11 +0000 Subject: [PATCH] upgrade to latest dependencies bumping knative.dev/hack/schema 8834794...5deadde: > 5deadde :bug: Set latest release only when publishing to Github (# 346) bumping knative.dev/hack 8834794...5deadde: > 5deadde :bug: Set latest release only when publishing to Github (# 346) Signed-off-by: Knative Automation --- go.mod | 4 ++-- go.sum | 8 ++++---- vendor/knative.dev/hack/release.sh | 11 +++++++++-- vendor/modules.txt | 4 ++-- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 617cfd3dd..d549b4f97 100644 --- a/go.mod +++ b/go.mod @@ -10,8 +10,8 @@ require ( k8s.io/client-go v0.27.6 k8s.io/code-generator v0.27.6 k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f - knative.dev/hack v0.0.0-20231107173840-883479423aaa - knative.dev/hack/schema v0.0.0-20231107173840-883479423aaa + knative.dev/hack v0.0.0-20231109190034-5deaddeb51a7 + knative.dev/hack/schema v0.0.0-20231109190034-5deaddeb51a7 knative.dev/pkg v0.0.0-20231108014432-35011d423d4b ) diff --git a/go.sum b/go.sum index b4bfcd1f5..20b9cbdc6 100644 --- a/go.sum +++ b/go.sum @@ -679,10 +679,10 @@ k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5F k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= k8s.io/utils v0.0.0-20230209194617-a36077c30491 h1:r0BAOLElQnnFhE/ApUsg3iHdVYYPBjNSSOMowRZxxsY= k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -knative.dev/hack v0.0.0-20231107173840-883479423aaa h1:XVFqW2a8xvyo231TbVSD3i+580pVej9LbTSmYex6d1g= -knative.dev/hack v0.0.0-20231107173840-883479423aaa/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= -knative.dev/hack/schema v0.0.0-20231107173840-883479423aaa h1:g5PQEwrJcwr8uttycYgTslW8JwIH5VwKe15YIfdY69E= -knative.dev/hack/schema v0.0.0-20231107173840-883479423aaa/go.mod h1:3pWwBLnTZSM9psSgCAvhKOHIPTzqfEMlWRpDu6IYhK0= +knative.dev/hack v0.0.0-20231109190034-5deaddeb51a7 h1:HXf7M7n9jwn+Hp904r0HXRSymf+DLXSciFpXVpCg+Bs= +knative.dev/hack v0.0.0-20231109190034-5deaddeb51a7/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= +knative.dev/hack/schema v0.0.0-20231109190034-5deaddeb51a7 h1:6SrcvRGL2vRGCUl8feGsDSiGrCSaPS0w6kcVoWWmpQc= +knative.dev/hack/schema v0.0.0-20231109190034-5deaddeb51a7/go.mod h1:3pWwBLnTZSM9psSgCAvhKOHIPTzqfEMlWRpDu6IYhK0= knative.dev/pkg v0.0.0-20231108014432-35011d423d4b h1:WrDo9M6vkJ4xnTBodWOT2koXjKqr7dOqJH4RWBq4kBw= knative.dev/pkg v0.0.0-20231108014432-35011d423d4b/go.mod h1:zkycL49skv31nWKvT1XAsSMFO6mUu33Qhpv0xDvdVGY= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/vendor/knative.dev/hack/release.sh b/vendor/knative.dev/hack/release.sh index 68e75e9ca..256ae40d0 100644 --- a/vendor/knative.dev/hack/release.sh +++ b/vendor/knative.dev/hack/release.sh @@ -658,13 +658,18 @@ function publish_artifacts() { # Sets the github release with the highest semver to 'latest' function set_latest_to_highest_semver() { - local last_version # don't combine with the line below, or $? will be 0 + if ! (( PUBLISH_TO_GITHUB )); then + return 0 + fi + echo "Setting latest release to highest semver" + + local last_version release_id # don't combine with assignment else $? will be 0 + last_version="$(hub_tool -p release | cut -d'-' -f2 | grep '^v[0-9]\+\.[0-9]\+\.[0-9]\+$'| sort -r -V | head -1)" if ! [[ $? -eq 0 ]]; then abort "cannot list releases" fi - local release_id # don't combine with the line below, or $? will be 0 release_id="$(hub_tool api "/repos/${ORG_NAME}/${REPO_NAME}/releases/tags/knative-${last_version}" | jq .id)" if [[ $? -ne 0 ]]; then abort "cannot get relase id from github" @@ -701,6 +706,8 @@ function main() { function_exists build_release || abort "function 'build_release()' not defined" [[ -x ${VALIDATION_TESTS} ]] || abort "test script '${VALIDATION_TESTS}' doesn't exist" + banner "Environment variables" + env # Log what will be done and where. banner "Release configuration" if which gcloud &>/dev/null ; then diff --git a/vendor/modules.txt b/vendor/modules.txt index d93c903b4..966514e9f 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -830,10 +830,10 @@ k8s.io/utils/net k8s.io/utils/pointer k8s.io/utils/strings/slices k8s.io/utils/trace -# knative.dev/hack v0.0.0-20231107173840-883479423aaa +# knative.dev/hack v0.0.0-20231109190034-5deaddeb51a7 ## explicit; go 1.18 knative.dev/hack -# knative.dev/hack/schema v0.0.0-20231107173840-883479423aaa +# knative.dev/hack/schema v0.0.0-20231109190034-5deaddeb51a7 ## explicit; go 1.18 knative.dev/hack/schema/commands knative.dev/hack/schema/docs