From f2b1a802a9c617c056565a70a432787f020357ee Mon Sep 17 00:00:00 2001 From: Jordan Keister Date: Mon, 11 Nov 2024 12:16:04 -0600 Subject: [PATCH] add macos codesigning of opm binary for apple silicon Signed-off-by: Jordan Keister --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 67b2ac3b5..7b5d8f5a2 100644 --- a/Makefile +++ b/Makefile @@ -55,6 +55,10 @@ $(CMDS): $(OPM): opm_version_flags=-ldflags "-X '$(PKG)/cmd/opm/version.gitCommit=$(GIT_COMMIT)' -X '$(PKG)/cmd/opm/version.opmVersion=$(OPM_VERSION)' -X '$(PKG)/cmd/opm/version.buildDate=$(BUILD_DATE)'" $(OPM): $(extra_env) $(GO) build $(opm_version_flags) $(extra_flags) $(TAGS) -o $@ ./cmd/$(notdir $@) +ifeq ($(shell go env GOARCH),arm64) + codesign --sign - --force --preserve-metadata=entitlements,requirements,flags,runtime $(OPM) +endif + .PHONY: build build: clean $(CMDS) $(OPM)