Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will also hit Raspberry Pi, and miss those older Intel models that can run Sequoia. Did you want to check explicitly for macOS?

Suggested change
ifeq ($(shell go env GOARCH),arm64)
ifeq ($(shell go env GOOS),darwin)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't want to test GOOS, because intel-based darwin doesn't have this requirement. I couldn't figure out how to do a double conditional well to select only the darwin+arm64 set of targets.

codesign --sign - --force --preserve-metadata=entitlements,requirements,flags,runtime $(OPM)
endif


.PHONY: build
build: clean $(CMDS) $(OPM)
Expand Down