Skip to content

Commit

Permalink
Change: add code-generator into Makefile
Browse files Browse the repository at this point in the history
Signed-off-by: jhu02 <[email protected]>
  • Loading branch information
jhu02 authored and jhu02 committed Feb 24, 2022
1 parent e1d6816 commit 6c81fde
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,20 @@ CONTROLLER_GEN=$(GOBIN)/controller-gen
else
CONTROLLER_GEN=$(shell which controller-gen)
endif


# generate client code
ifeq (, $(shell which code-generator))
@{ \
set -e ;\
code_generator_TMP_DIR=$$(mkdir ~/go/src/k8s.io/) ;\
cd $$code_generator_TMP_DIR ;\
go mod init code_generator_TMP_DIR ;\
go get k8s.io/[email protected] ;\
}
CONTROLLER_GEN=$(GOSRC)/code-generator/generate-groups.sh \
"deepcopy,client,informer,lister" \
pkg/client pkg/apis\
addon:v1alpha1 \
--go-header-file ./hack/boilerplate.go.txt
endif

0 comments on commit 6c81fde

Please sign in to comment.