@@ -10,7 +10,35 @@ This is the script to update clientset/informers/listers and API deepcopy code u
10
10
11
11
Make sure to run this script after making changes to /pkg/apis/volumesnapshot/v1beta1/types.go.
12
12
13
- To run this script, simply run: ./hack/update-generated-code.sh from the project root directory.
13
+ To run this script, you have to patch it:
14
+ ``` patch
15
+ diff --git a/hack/update-generated-code.sh b/hack/update-generated-code.sh
16
+ --- a/hack/update-generated-code.sh
17
+ +++ b/hack/update-generated-code.sh
18
+ @@ -27,7 +27,7 @@ CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${SCRIPT_ROOT}; ls -d -1 ./vendor/k8s.io/code-ge
19
+ # k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir
20
+ # instead of the $GOPATH directly. For normal projects this can be dropped.
21
+ bash ${CODEGEN_PKG}/generate-groups.sh "deepcopy,client,informer,lister" \
22
+ - github.com/kubernetes-csi/external-snapshotter/pkg/client github.com/kubernetes-csi/external-snapshotter/pkg/apis \
23
+ + github.com/kubernetes-csi/external-snapshotter/v2/pkg/client github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis \
24
+ volumesnapshot:v1beta1 \
25
+ --go-header-file ${SCRIPT_ROOT}/hack/boilerplate.go.txt
26
+ ```
27
+
28
+ Once you are done with patching, continue:
29
+ ``` bash
30
+ rm -fr v2/
31
+ ln -sfvn $( pwd) v2
32
+ rm -fr pkg/client
33
+ ```
34
+
35
+ Run: ./hack/update-generated-code.sh from the project root directory.
36
+
37
+ Do not forget to revert previously applied workaround:
38
+ ``` bash
39
+ git checkout -- v2/
40
+ git checkout -- hack/update-generated-code.sh
41
+ ```
14
42
15
43
## update-crd.sh
16
44
0 commit comments