Skip to content

Commit 1c33eb4

Browse files
committed
Add check-generate target to makefile
Signed-off-by: Evan Lezar <[email protected]>
1 parent cdc471e commit 1c33eb4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ endif
3030
CMDS := $(patsubst ./cmd/%/,%,$(sort $(dir $(wildcard ./cmd/*/))))
3131
CMD_TARGETS := $(patsubst %,cmd-%, $(CMDS))
3232

33-
CHECK_TARGETS := golangci-lint
33+
CHECK_TARGETS := golangci-lint check-generate
3434
MAKE_TARGETS := binaries build build-image check fmt lint-internal test examples cmds coverage generate vendor check-modules $(CHECK_TARGETS)
3535

3636
TARGETS := $(MAKE_TARGETS) $(CMD_TARGETS)
@@ -101,6 +101,9 @@ coverage: test
101101

102102
generate: generate-deepcopy fmt
103103

104+
check-generate: generate
105+
git diff --exit-code HEAD
106+
104107
generate-deepcopy: .remove-deepcopy
105108
for dir in $(DEEPCOPY_SOURCES); do \
106109
controller-gen \

0 commit comments

Comments
 (0)