diff --git a/Makefile b/Makefile index 36c95bff746..f175554aaec 100644 --- a/Makefile +++ b/Makefile @@ -105,7 +105,7 @@ discoverycache: $(MAKE) generate .PHONY: generate -generate: install-tools +generate: install-tools fix-macos-mockgen go generate ./... # TODO: This does not work outside of GOROOT. We should replace all usage of the @@ -348,6 +348,13 @@ xmlcov: $(GOCOV) $(GOCOV_XML) install-tools: $(BINGO) $(BINGO) get -l +# Fixes https://github.com/uber-go/mock/issues/185 +.PHONY: fix-macos-mockgen +fix-macos-mockgen: +ifeq ($(shell uname -s),Darwin) + codesign -f -s - ${GOPATH}/bin/mockgen +endif + ############################################################################### # Containerized CI/CD RP ###############################################################################