-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change: add code-generator into Makefile
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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |