From 65bcd82f4c4f3baff0f2228eadb7b10ef33fefb9 Mon Sep 17 00:00:00 2001 From: Knative Automation Date: Mon, 6 Nov 2023 01:34:53 +0000 Subject: [PATCH] upgrade to latest dependencies bumping knative.dev/hack d4af42e...0d99b7e: > 0d99b7e add function to set latest semver to latest (# 339) Signed-off-by: Knative Automation --- go.mod | 2 +- go.sum | 4 ++-- vendor/knative.dev/hack/release.sh | 19 +++++++++++++++++++ vendor/modules.txt | 2 +- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 4c4683aefb..29439f12e2 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( google.golang.org/grpc v1.36.0 gopkg.in/go-playground/webhooks.v3 v3.13.0 gopkg.in/yaml.v2 v2.3.0 - knative.dev/hack v0.0.0-20231025074238-d4af42e9b222 + knative.dev/hack v0.0.0-20231102183416-0d99b7ee9d63 ) require ( diff --git a/go.sum b/go.sum index b051393586..d44ffe7d6c 100644 --- a/go.sum +++ b/go.sum @@ -539,8 +539,8 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.5 h1:nI5egYTGJakVyOryqLs1cQO5dO0ksin5XXs2pspk75k= honnef.co/go/tools v0.0.1-2020.1.5/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -knative.dev/hack v0.0.0-20231025074238-d4af42e9b222 h1:xjfhm3OayDP+7n8cWnETiwG/TXsAeyKFQQsbxPlZ0WQ= -knative.dev/hack v0.0.0-20231025074238-d4af42e9b222/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= +knative.dev/hack v0.0.0-20231102183416-0d99b7ee9d63 h1:QNbIbsep8jreNCXj3EFrsw0RtsrmMZw7yxYyUG5AILs= +knative.dev/hack v0.0.0-20231102183416-0d99b7ee9d63/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/vendor/knative.dev/hack/release.sh b/vendor/knative.dev/hack/release.sh index 5d4f09a890..e6e386bbac 100644 --- a/vendor/knative.dev/hack/release.sh +++ b/vendor/knative.dev/hack/release.sh @@ -655,6 +655,24 @@ function publish_artifacts() { banner "New release published successfully" } +# 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 + 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" + fi + + hub_tool api --method PATCH /repos/knative/serving/releases/$release_id -F make_latest=true > /dev/null || abort "error settomg $last_version to 'latest'" + echo "Github release ${last_version} set as 'latest'" +} + # Entry point for a release script. function main() { parse_flags "$@" @@ -727,6 +745,7 @@ function main() { done echo "New release built successfully" publish_artifacts + set_latest_to_highest_semver } # Publishes a new release on GitHub, also git tagging it (unless this is not a versioned release). diff --git a/vendor/modules.txt b/vendor/modules.txt index 116b2e6d98..feed177402 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -299,7 +299,7 @@ gopkg.in/go-playground/webhooks.v3/github gopkg.in/yaml.v2 # honnef.co/go/tools v0.0.1-2020.1.5 ## explicit; go 1.11 -# knative.dev/hack v0.0.0-20231025074238-d4af42e9b222 +# knative.dev/hack v0.0.0-20231102183416-0d99b7ee9d63 ## explicit; go 1.18 knative.dev/hack # go.opencensus.io => go.opencensus.io v0.20.2