Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 12 additions & 21 deletions hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,25 @@ set -o pipefail

source $(dirname $0)/../vendor/knative.dev/hack/codegen-library.sh

# If we run with -mod=vendor here, then generate-groups.sh looks for vendor files in the wrong place.
export GOFLAGS=-mod=

echo "=== Update Codegen for $MODULE_NAME"

group "Generating checksums for configmap _example keys"

go run "${REPO_ROOT_DIR}/vendor/knative.dev/pkg/configmap/hash-gen" "${REPO_ROOT_DIR}"/config/config-network.yaml
go run knative.dev/pkg/configmap/hash-gen "${REPO_ROOT_DIR}/config/config-network.yaml"

group "Kubernetes Codegen"
source "${CODEGEN_PKG}/kube_codegen.sh"

# generate the code with:
# --output-base because this script should also be able to run inside the vendor dir of
# k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir
# instead of the $GOPATH directly. For normal projects this can be dropped.
${CODEGEN_PKG}/generate-groups.sh "deepcopy,client,informer,lister" \
knative.dev/networking/pkg/client knative.dev/networking/pkg/apis \
"networking:v1alpha1" \
--go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt
kube::codegen::gen_helpers \
--boilerplate "${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt" \
"${REPO_ROOT_DIR}/pkg/apis"

kube::codegen::gen_client \
--boilerplate "${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt" \
--output-dir "${REPO_ROOT_DIR}/pkg/client" \
--output-pkg "knative.dev/networking/pkg/client" \
--with-watch \
"${REPO_ROOT_DIR}/pkg/apis"

group "Knative Codegen"

Expand All @@ -48,15 +48,6 @@ ${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh "injection" \
"networking:v1alpha1" \
--go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt

group "Deepcopy Gen"

# Depends on generate-groups.sh to install bin/deepcopy-gen
${GOPATH}/bin/deepcopy-gen \
-O zz_generated.deepcopy \
--go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt \
-i knative.dev/networking/pkg/apis/config \
-i knative.dev/networking/pkg/config

group "Update deps post-codegen"

# Make sure our dependencies are up-to-date
Expand Down
6 changes: 5 additions & 1 deletion pkg/client/clientset/versioned/fake/clientset_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

146 changes: 10 additions & 136 deletions pkg/client/clientset/versioned/typed/networking/v1alpha1/certificate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading