Skip to content

Commit

Permalink
upgrade to latest dependencies (#2887)
Browse files Browse the repository at this point in the history
bumping knative.dev/hack d4af42e...0d99b7e:
  > 0d99b7e add function to set latest semver to latest (# 339)

Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation authored Nov 7, 2023
1 parent acf0a2d commit 5c9b7a8
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ require (
k8s.io/gengo v0.0.0-20221011193443-fad74ee6edd9
k8s.io/klog/v2 v2.90.1
k8s.io/utils v0.0.0-20230209194617-a36077c30491
knative.dev/hack v0.0.0-20231025074238-d4af42e9b222
knative.dev/hack v0.0.0-20231102183416-0d99b7ee9d63
sigs.k8s.io/yaml v1.4.0
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,8 @@ 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-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=
pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw=
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=
Expand Down
19 changes: 19 additions & 0 deletions vendor/knative.dev/hack/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
Expand Down Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ k8s.io/utils/net
k8s.io/utils/pointer
k8s.io/utils/strings/slices
k8s.io/utils/trace
# knative.dev/hack v0.0.0-20231025074238-d4af42e9b222
# knative.dev/hack v0.0.0-20231102183416-0d99b7ee9d63
## explicit; go 1.18
knative.dev/hack
# sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd
Expand Down

0 comments on commit 5c9b7a8

Please sign in to comment.