Skip to content

Commit

Permalink
upgrade to latest dependencies
Browse files Browse the repository at this point in the history
bumping knative.dev/hack d4af42e...8834794:
  > 8834794 Call set_latest_to_highest_semver after publishing a new release (# 343)
  > 0d99b7e add function to set latest semver to latest (# 339)

Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation committed Nov 8, 2023
1 parent 150c804 commit 5f48be2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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-20231107173840-883479423aaa

)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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-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-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=
Expand Down
20 changes: 20 additions & 0 deletions vendor/knative.dev/hack/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -652,9 +652,29 @@ function publish_artifacts() {
fi
[[ -n "${RELEASE_GCS_BUCKET}" ]] && publish_to_gcs "${ARTIFACTS_TO_PUBLISH}"
publish_to_github "${ARTIFACTS_TO_PUBLISH}"
set_latest_to_highest_semver
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 "$@"
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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-20231107173840-883479423aaa
## explicit; go 1.18
knative.dev/hack

0 comments on commit 5f48be2

Please sign in to comment.