@@ -74,16 +74,12 @@ api/%/zz_generated.deepcopy.go: bin/controller-gen $(DEEPCOPY_GEN_INPUTS)
74
74
75
75
MANAGER_BIN_INPUTS =$(shell find ./controllers ./api ./pkg -name "* mock* " -prune -o -name "* test* " -prune -o -type f -print) main.go go.mod go.sum
76
76
.PHONY : build
77
- build : binaries generate-mocks generate- deepcopy manifests release-manifests # # Build manager binary.
77
+ build : binaries generate-deepcopy lint manifests release-manifests # # Build manager binary.
78
78
bin/manager : $(MANAGER_BIN_INPUTS )
79
- go fmt ./...
80
- go vet ./...
81
79
go build -o bin/manager main.go
82
80
83
81
.PHONY : run
84
- run : generate-deepcopy fmt vet # # Run a controller from your host.
85
- go fmt ./...
86
- go vet ./...
82
+ run : generate-deepcopy # # Run a controller from your host.
87
83
go run ./main.go
88
84
89
85
# Using a flag file here as docker build doesn't produce a target file.
@@ -163,14 +159,14 @@ clean: ## Clean.
163
159
export KUBEBUILDER_ASSETS =$(PROJECT_DIR ) /bin
164
160
165
161
.PHONY : test
166
- test : generate-mocks lint generate-deepcopy bin/ginkgo bin/kubectl bin/kube-apiserver bin/etcd # # Run tests. At the moment this is only unit tests.
162
+ test : generate-mocks lint bin/ginkgo bin/kubectl bin/kube-apiserver bin/etcd # # Run tests. At the moment this is only unit tests.
167
163
@./hack/testing_ginkgo_recover_statements.sh --add # Add ginkgo.GinkgoRecover() statements to controllers.
168
164
@# The following is a slightly funky way to make sure the ginkgo statements are removed regardless the test results.
169
165
@ginkgo -v ./api/... ./controllers/... ./pkg/... -coverprofile cover.out; EXIT_STATUS=$$? ; \
170
166
./hack/testing_ginkgo_recover_statements.sh --remove; exit $$ EXIT_STATUS
171
167
172
168
.PHONY : generate-mocks
173
- generate-mocks : bin/mockgen pkg/mocks/mock_client.go $(shell find ./pkg/mocks -type f -name "mock* .go") # # Generate mocks needed for testing. Primarily mocks of the cloud package.
169
+ generate-mocks : bin/mockgen generagte-deepcopy pkg/mocks/mock_client.go $(shell find ./pkg/mocks -type f -name "mock* .go") # # Generate mocks needed for testing. Primarily mocks of the cloud package.
174
170
pkg/mocks/mock% .go : $(shell find ./pkg/cloud -type f -name "* test* " -prune -o -print)
175
171
go generate ./...
176
172
0 commit comments