Skip to content

Commit

Permalink
upgrade to latest dependencies
Browse files Browse the repository at this point in the history
bumping knative.dev/client-pkg b5ae1d7...83abcc0:
  > 83abcc0 Add consistent SECURITY.md (# 132)
  > 26b8741 upgrade to latest dependencies (# 130)
bumping knative.dev/hack 2c938d4...eb35242:
  > eb35242 Adding the variable `KNATIVE_EVENTING_RELEASE_TLS` to install latest eventing TLS (# 350)
  > 5deadde 🐛 Set latest release only when publishing to Github (# 346)
  > 8834794 Call set_latest_to_highest_semver after publishing a new release (# 343)
  > 0d99b7e add function to set latest semver to latest (# 339)
  > d4af42e Make generate-groups.sh and generate-knative.sh executable conditionally (# 338)

Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation committed Nov 23, 2023
1 parent aa0062f commit 66b76ec
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 10 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ go 1.18
require (
github.com/spf13/cobra v1.6.0
gotest.tools/v3 v3.3.0
knative.dev/client-pkg v0.0.0-20231024135303-b5ae1d740f47
knative.dev/hack v0.0.0-20231016131700-2c938d4918da
knative.dev/client-pkg v0.0.0-20231120183025-83abcc001800
knative.dev/hack v0.0.0-20231122182901-eb352426ecc1
)

require (
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools/v3 v3.3.0 h1:MfDY1b1/0xN1CyMlQDac0ziEy9zJQd9CXBRRDHw2jJo=
gotest.tools/v3 v3.3.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A=
knative.dev/client-pkg v0.0.0-20231024135303-b5ae1d740f47 h1:IiLYm7GbSLPxfWXcw5rsPdAFWVpl6tlC5IBHxctl7IA=
knative.dev/client-pkg v0.0.0-20231024135303-b5ae1d740f47/go.mod h1:VYGZ7f4Lei8n7D2ueJ1tMPCg6+bL6ndiUYMnZA6TFTc=
knative.dev/hack v0.0.0-20231016131700-2c938d4918da h1:xy+fvuz2LDOMsZ5UwXRaMF70NYUs9fsG+EF5/ierYBg=
knative.dev/hack v0.0.0-20231016131700-2c938d4918da/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/client-pkg v0.0.0-20231120183025-83abcc001800 h1:PpRzA+9UO1ULIcdaqHGs4qiWK2rgZAAvAwa6L+oPDdU=
knative.dev/client-pkg v0.0.0-20231120183025-83abcc001800/go.mod h1:clbAkxi9x0pUNk0Vjd4NOF9yAHrBNGA29ZDaqwk8MrQ=
knative.dev/hack v0.0.0-20231122182901-eb352426ecc1 h1:ZUkFAaq5gEls7bJ2ADLg+ZJVtN3KUcHEWx5ngLfacuQ=
knative.dev/hack v0.0.0-20231122182901-eb352426ecc1/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
4 changes: 2 additions & 2 deletions vendor/knative.dev/hack/codegen-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ export GOBIN=${GOPATH}/bin # Set GOBIN explicitly as deepcopy-gen is installed b
export CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${REPO_ROOT_DIR}; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ../code-generator)}
export KNATIVE_CODEGEN_PKG=${KNATIVE_CODEGEN_PKG:-$(cd ${REPO_ROOT_DIR}; ls -d -1 ./vendor/knative.dev/pkg 2>/dev/null || echo "${REPO_ROOT_DIR}")}

chmod +x ${CODEGEN_PKG}/generate-groups.sh
chmod +x ${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh
[ -x ${CODEGEN_PKG}/generate-groups.sh ] || chmod +x ${CODEGEN_PKG}/generate-groups.sh
[ -x ${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh ] || chmod +x ${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh
1 change: 1 addition & 0 deletions vendor/knative.dev/hack/library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1031,3 +1031,4 @@ readonly KNATIVE_SERVING_RELEASE_CRDS="$(get_latest_knative_yaml_source "serving
readonly KNATIVE_SERVING_RELEASE_CORE="$(get_latest_knative_yaml_source "serving" "serving-core")"
readonly KNATIVE_NET_ISTIO_RELEASE="$(get_latest_knative_yaml_source "net-istio" "net-istio")"
readonly KNATIVE_EVENTING_RELEASE="$(get_latest_knative_yaml_source "eventing" "eventing")"
readonly KNATIVE_EVENTING_RELEASE_TLS="$(get_latest_knative_yaml_source "eventing" "eventing-tls-networking")"
27 changes: 27 additions & 0 deletions vendor/knative.dev/hack/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -652,9 +652,34 @@ 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() {
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

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 All @@ -681,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
Expand Down
4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ gotest.tools/v3/internal/assert
gotest.tools/v3/internal/difflib
gotest.tools/v3/internal/format
gotest.tools/v3/internal/source
# knative.dev/client-pkg v0.0.0-20231024135303-b5ae1d740f47
# knative.dev/client-pkg v0.0.0-20231120183025-83abcc001800
## explicit; go 1.18
knative.dev/client-pkg/pkg/kn/plugin
# knative.dev/hack v0.0.0-20231016131700-2c938d4918da
# knative.dev/hack v0.0.0-20231122182901-eb352426ecc1
## explicit; go 1.18
knative.dev/hack

0 comments on commit 66b76ec

Please sign in to comment.