From db0b10c89e9bb11866c4a43698b6c7d2296eb70b Mon Sep 17 00:00:00 2001 From: kimorris27 Date: Thu, 10 Oct 2024 16:36:55 -0500 Subject: [PATCH] Codify solution to https://github.com/uber-go/mock/issues/185 for MacOS users --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 ###############################################################################