Skip to content

Commit d5d8de5

Browse files
committed
Fix regression when generating deep copy
1 parent 9d7828f commit d5d8de5

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

hack/update-codegen-clients.sh

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ go install "${CODEGEN_PKG}"/cmd/client-gen
3535
# TODO: This is hack to allow CI to pass
3636
chmod +x "${CODEGEN_PKG}"/generate-internal-groups.sh
3737

38+
source "${CODEGEN_PKG}/kube_codegen.sh"
39+
3840
"$GOPATH"/bin/applyconfiguration-gen \
3941
--go-header-file ./hack/../hack/boilerplate/boilerplate.generatego.txt \
4042
--output-pkg github.com/kcp-dev/kcp/sdk/client/applyconfiguration \
@@ -60,12 +62,9 @@ chmod +x "${CODEGEN_PKG}"/generate-internal-groups.sh
6062
--apply-configuration-package=github.com/kcp-dev/kcp/sdk/client/applyconfiguration \
6163
--clientset-name "versioned"
6264

63-
bash "${CODEGEN_PKG}"/kube_codegen.sh "deepcopy" \
64-
github.com/kcp-dev/kcp/sdk/client github.com/kcp-dev/kcp/sdk/apis \
65-
"core:v1alpha1 tenancy:v1alpha1 apis:v1alpha1 topology:v1alpha1" \
66-
--go-header-file "${SCRIPT_ROOT}"/hack/boilerplate/boilerplate.generatego.txt \
67-
--output-base "${SCRIPT_ROOT}" \
68-
--trim-path-prefix github.com/kcp-dev/kcp
65+
kube::codegen::gen_helpers \
66+
--boilerplate "${SCRIPT_ROOT}"/hack/boilerplate/boilerplate.generatego.txt \
67+
./sdk/apis
6968

7069
pushd ./sdk/apis
7170
${CODE_GENERATOR} \
@@ -92,19 +91,13 @@ popd
9291
--go-header-file ./hack/../hack/boilerplate/boilerplate.generatego.txt \
9392
--output-dir "${SCRIPT_ROOT}/test/e2e/fixtures/wildwest/client/clientset"
9493

95-
bash "${CODEGEN_PKG}"/kube_codegen.sh "deepcopy" \
96-
github.com/kcp-dev/kcp/third_party/conditions/client github.com/kcp-dev/kcp/third_party/conditions/apis \
97-
"conditions:v1alpha1" \
98-
--go-header-file "${SCRIPT_ROOT}"/hack/boilerplate/boilerplate.generatego.txt \
99-
--output-base "${SCRIPT_ROOT}" \
100-
--trim-path-prefix github.com/kcp-dev/kcp
94+
kube::codegen::gen_helpers \
95+
--boilerplate "${SCRIPT_ROOT}"/hack/boilerplate/boilerplate.generatego.txt \
96+
./sdk/third_party/conditions/apis
10197

102-
bash "${CODEGEN_PKG}"/kube_codegen.sh "deepcopy" \
103-
github.com/kcp-dev/kcp/test/e2e/fixtures/wildwest/client github.com/kcp-dev/kcp/test/e2e/fixtures/wildwest/apis \
104-
"wildwest:v1alpha1" \
105-
--go-header-file "${SCRIPT_ROOT}"/hack/boilerplate/boilerplate.generatego.txt \
106-
--output-base "${SCRIPT_ROOT}" \
107-
--trim-path-prefix github.com/kcp-dev/kcp
98+
kube::codegen::gen_helpers \
99+
--boilerplate "${SCRIPT_ROOT}"/hack/boilerplate/boilerplate.generatego.txt \
100+
./test/e2e/fixtures/wildwest/apis
108101

109102
pushd ./test/e2e/fixtures/wildwest/apis
110103
${CODE_GENERATOR} \

0 commit comments

Comments
 (0)