Skip to content

Commit

Permalink
Extract make generate-fast and run it in skaffold
Browse files Browse the repository at this point in the history
  • Loading branch information
timebertt committed Nov 11, 2023
1 parent 27e7c57 commit 046713d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ clean-tools-bin: ## Empty the tools binary directory
modules: ## Runs go mod to ensure modules are up to date.
go mod tidy

.PHONY: generate
generate: $(CONTROLLER_GEN) modules ## Run all code generators
.PHONY: generate-fast
generate-fast: $(CONTROLLER_GEN) modules ## Run all fast code generators
$(CONTROLLER_GEN) rbac:roleName=sharder crd paths="./pkg/..." output:rbac:artifacts:config=config/rbac output:crd:artifacts:config=config/crds
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./pkg/..."

.PHONY: generate
generate: generate-fast modules ## Run all code generators
hack/update-codegen.sh

.PHONY: fmt
Expand Down
7 changes: 7 additions & 0 deletions hack/config/skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,13 @@ manifests:
paths:
- config/default
- config/monitoring/default
hooks:
before:
- host:
command:
# ensure deepcopy, CRDs, and RBAC are up-to-date
- make
- generate-fast
deploy:
kubectl:
flags:
Expand Down

0 comments on commit 046713d

Please sign in to comment.