File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -23,19 +23,15 @@ CODEGEN_PKG=${CODEGEN_PKG:-$(cd "${SCRIPT_ROOT}"; ls -d -1 ./vendor/k8s.io/code-
23
23
24
24
source " ${CODEGEN_PKG} /kube_codegen.sh"
25
25
26
- # generate the code with:
27
- # --output-base because this script should also be able to run inside the vendor dir of
28
- # k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir
29
- # instead of the $GOPATH directly. For normal projects this can be dropped.
26
+ THIS_PKG=" k8s.io/sample-controller"
30
27
31
28
kube::codegen::gen_helpers \
32
- --input-pkg-root k8s.io/sample-controller/pkg/apis \
33
- --output-base " $( dirname " ${BASH_SOURCE[0]} " ) /../../.." \
34
- --boilerplate " ${SCRIPT_ROOT} /hack/boilerplate.go.txt"
29
+ --boilerplate " ${SCRIPT_ROOT} /hack/boilerplate.go.txt" \
30
+ " ${SCRIPT_ROOT} /pkg/apis"
35
31
36
32
kube::codegen::gen_client \
37
33
--with-watch \
38
- --input-pkg-root k8s.io/sample-controller/ pkg/apis \
39
- --output-pkg-root k8s.io/sample-controller/ pkg/generated \
40
- --output-base " $( dirname " ${BASH_SOURCE[0]} " ) /../../.. " \
41
- --boilerplate " ${SCRIPT_ROOT} /hack/boilerplate.go.txt "
34
+ --output-dir " ${SCRIPT_ROOT} / pkg/generated " \
35
+ --output-pkg " ${THIS_PKG} / pkg/generated" \
36
+ --boilerplate " ${SCRIPT_ROOT} /hack/boilerplate.go.txt " \
37
+ " ${SCRIPT_ROOT} /pkg/apis "
You can’t perform that action at this time.
0 commit comments