Skip to content

Commit 530c1ee

Browse files
authored
Adds a clean-generated target to remove stale generated files (#4082)
* Adds a clean-generated target to remove stale generated files * Update the docs for make generate
1 parent f0859ea commit 530c1ee

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,15 @@ CEL_TEST_CRD_CHANNEL ?= standard
6060

6161
all: generate vet fmt verify test
6262

63+
.PHONY: clean-generated
64+
clean-generated:
65+
rm -rf pkg/client/clientset
66+
rm -rf pkg/client/listers
67+
rm -rf pkg/client/informers
68+
6369
# Run generators for protos, Deepcopy funcs, CRDs, and docs.
6470
.PHONY: generate
65-
generate: update-codegen
71+
generate: clean-generated update-codegen
6672

6773
.PHONY: update-codegen
6874
update-codegen:

site-src/contributing/devguide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ outside $GOPATH as well.
6161

6262
### Build the Code
6363

64-
The project uses `make` to drive the build. `make` will run code generators, and
64+
The project uses `make` to drive the build. `make` will clean up previously generated code, run code generators, and
6565
run static analysis against the code and generate Kubernetes CRDs. You can kick
6666
off an overall build from the top-level makefile:
6767

0 commit comments

Comments
 (0)