fix(moq): remove previous moqs before generation

The previous moq seems to get in the way of generating new ones, this
removes the previous moq before it attempts to create a new one.
This commit is contained in:
Aaron U'Ren 2023-09-10 12:44:39 -05:00 committed by Aaron U'Ren
parent 4556aa3b2f
commit ee85441c6e

View File

@ -191,6 +191,7 @@ gomoqs: ./pkg/controllers/proxy/network_services_controller_moq.go
# file_moq.go file is generated from file.go "//go:generate moq ..." in-file # file_moq.go file is generated from file.go "//go:generate moq ..." in-file
# annotation, as it needs to know which interfaces to create mock stubs for # annotation, as it needs to know which interfaces to create mock stubs for
%_moq.go: %.go %_moq.go: %.go
rm -f $(*)_moq.go
ifeq "$(BUILD_IN_DOCKER)" "true" ifeq "$(BUILD_IN_DOCKER)" "true"
$(DOCKER) run -v $(PWD):/go/src/github.com/cloudnativelabs/kube-router \ $(DOCKER) run -v $(PWD):/go/src/github.com/cloudnativelabs/kube-router \
-v $(GO_CACHE):/root/.cache/go-build \ -v $(GO_CACHE):/root/.cache/go-build \