File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 3232 - name : Regenerate OverlayExtensionConfig CRD
3333 run : make -C crd/overlayextensionconfig
3434 - name : Fail if the tree is dirty
35- run : test -z "$(git status --porcelain)"
35+ run : |
36+ if [ -n "$(git status --porcelain)" ]; then
37+ echo "Changes detected. Please run 'make regenerate-crd' locally to regenerate crds."
38+ exit 1
39+ fi
Original file line number Diff line number Diff line change @@ -943,6 +943,11 @@ dockerfiles: renderkit ## Render all Dockerfile templates with current state of
943943 @make -f build/images.mk render PATH=cns
944944 @make -f build/images.mk render PATH=cni
945945
946+ regenerate-crd : controller-gen # # Regenerate CRDs
947+ @for makefile in $$(find ./crd/ -name "Makefile" -type f ) ; do \
948+ make -f $$ makefile all; \
949+ done
950+
946951
947952$(REPO_ROOT ) /.git/hooks/pre-push :
948953 @ln -s $(REPO_ROOT ) /.hooks/pre-push $(REPO_ROOT ) /.git/hooks/
@@ -961,11 +966,14 @@ setup: install-hooks gitconfig ## performs common required repo setup
961966
962967# #@ Tools
963968
964- tools : renderkit
969+ tools : renderkit controller-gen
965970
966971renderkit : # # Install renderkit for rendering Dockerfile templates
967972 @go install -modfile=$(TOOLS_GO_MOD ) github.com/orellazri/renderkit
968973
974+ controller-gen : # # Install renderkit for rendering Dockerfile templates
975+ @go install -modfile=$(TOOLS_GO_MOD ) -mod=readonly sigs.k8s.io/controller-tools/cmd/controller-gen
976+
969977# #@ Help
970978
971979help : # # Display this help
You can’t perform that action at this time.
0 commit comments