@@ -20,25 +20,25 @@ set -o pipefail
2020
2121source $( dirname $0 ) /../vendor/knative.dev/hack/codegen-library.sh
2222
23- # If we run with -mod=vendor here, then generate-groups.sh looks for vendor files in the wrong place.
24- export GOFLAGS=-mod=
25-
2623echo " === Update Codegen for $MODULE_NAME "
2724
2825group " Generating checksums for configmap _example keys"
2926
30- go run " ${REPO_ROOT_DIR} /vendor/ knative.dev/pkg/configmap/hash-gen" " ${REPO_ROOT_DIR} " /config/config-network.yaml
27+ go run knative.dev/pkg/configmap/hash-gen " ${REPO_ROOT_DIR} /config/config-network.yaml"
3128
3229group " Kubernetes Codegen"
30+ source " ${CODEGEN_PKG} /kube_codegen.sh"
3331
34- # generate the code with:
35- # --output-base because this script should also be able to run inside the vendor dir of
36- # k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir
37- # instead of the $GOPATH directly. For normal projects this can be dropped.
38- ${CODEGEN_PKG} /generate-groups.sh " deepcopy,client,informer,lister" \
39- knative.dev/networking/pkg/client knative.dev/networking/pkg/apis \
40- " networking:v1alpha1" \
41- --go-header-file ${REPO_ROOT_DIR} /hack/boilerplate/boilerplate.go.txt
32+ kube::codegen::gen_helpers \
33+ --boilerplate " ${REPO_ROOT_DIR} /hack/boilerplate/boilerplate.go.txt" \
34+ " ${REPO_ROOT_DIR} /pkg/apis"
35+
36+ kube::codegen::gen_client \
37+ --boilerplate " ${REPO_ROOT_DIR} /hack/boilerplate/boilerplate.go.txt" \
38+ --output-dir " ${REPO_ROOT_DIR} /pkg/client" \
39+ --output-pkg " knative.dev/networking/pkg/client" \
40+ --with-watch \
41+ " ${REPO_ROOT_DIR} /pkg/apis"
4242
4343group " Knative Codegen"
4444
@@ -48,15 +48,6 @@ ${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh "injection" \
4848 " networking:v1alpha1" \
4949 --go-header-file ${REPO_ROOT_DIR} /hack/boilerplate/boilerplate.go.txt
5050
51- group " Deepcopy Gen"
52-
53- # Depends on generate-groups.sh to install bin/deepcopy-gen
54- ${GOPATH} /bin/deepcopy-gen \
55- -O zz_generated.deepcopy \
56- --go-header-file ${REPO_ROOT_DIR} /hack/boilerplate/boilerplate.go.txt \
57- -i knative.dev/networking/pkg/apis/config \
58- -i knative.dev/networking/pkg/config
59-
6051group " Update deps post-codegen"
6152
6253# Make sure our dependencies are up-to-date
0 commit comments