From 2c30e8f5b9f0f50e3e1315dd9bf8d7222422c308 Mon Sep 17 00:00:00 2001 From: Knative Automation Date: Fri, 3 Nov 2023 02:31:34 +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 bdd9e368..b34b4ce2 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/spf13/cobra v1.6.0 gotest.tools/v3 v3.3.0 knative.dev/client-pkg v0.0.0-20231025084112-26b8741a2534 - knative.dev/hack v0.0.0-20231025074238-d4af42e9b222 + knative.dev/hack v0.0.0-20231102183416-0d99b7ee9d63 ) diff --git a/go.sum b/go.sum index ceab6267..3469284e 100644 --- a/go.sum +++ b/go.sum @@ -3359,8 +3359,8 @@ knative.dev/client-pkg v0.0.0-20231025084112-26b8741a2534 h1:f89Cw04y2Id5I5+kvc+ knative.dev/client-pkg v0.0.0-20231025084112-26b8741a2534/go.mod h1:clbAkxi9x0pUNk0Vjd4NOF9yAHrBNGA29ZDaqwk8MrQ= knative.dev/eventing v0.39.0/go.mod h1:MlEiEcHALqZnu0OFMuWdJfjBzM7HlSJfk8pQbTcIy4o= knative.dev/hack v0.0.0-20231016131700-2c938d4918da/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= -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= knative.dev/hack/schema v0.0.0-20231016131700-2c938d4918da/go.mod h1:3pWwBLnTZSM9psSgCAvhKOHIPTzqfEMlWRpDu6IYhK0= knative.dev/networking v0.0.0-20231017124814-2a7676e912b7/go.mod h1:1gcHoIVG47ekQWjkddqRq+/7tWRh+CB9W4k/NAcdRbk= knative.dev/pkg v0.0.0-20231017113806-d6ab72900ea5/go.mod h1:HHRXEd7ZlFpthgE+rwAZ6MUVnuJOAeolnaFSthXloUQ= diff --git a/vendor/knative.dev/hack/release.sh b/vendor/knative.dev/hack/release.sh index 5d4f09a8..e6e386bb 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 0ede6383..a1465982 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -25,6 +25,6 @@ gotest.tools/v3/internal/source # knative.dev/client-pkg v0.0.0-20231025084112-26b8741a2534 ## explicit; go 1.18 knative.dev/client-pkg/pkg/kn/plugin -# knative.dev/hack v0.0.0-20231025074238-d4af42e9b222 +# knative.dev/hack v0.0.0-20231102183416-0d99b7ee9d63 ## explicit; go 1.18 knative.dev/hack