mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-24 05:04:05 -08:00
chore: Sign project binary on MacOS
In order to be able to run the generated binary, it needs to be "cosigned". Also, please note that we use the "codesign" binary that's shipped in MacOS directly (instead of "promu codesign"), as that depends on an image that doesn't support linux/arm64 (w.r.t. darwin's rosetta emulation) yet: ``` WARNING: image platform (linux/amd64) does not match the expected platform (linux/arm64) ``` Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
This commit is contained in:
parent
2ffaff82c8
commit
ddddb00ed1
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -14,6 +14,7 @@ benchmark.txt
|
|||
/cmd/prometheus/debug
|
||||
/benchout
|
||||
/cmd/promtool/data
|
||||
_CodeSignature
|
||||
|
||||
!/.travis.yml
|
||||
!/.promu.yml
|
||||
|
|
|
@ -201,7 +201,10 @@ common-unused:
|
|||
.PHONY: common-build
|
||||
common-build: promu
|
||||
@echo ">> building binaries"
|
||||
$(PROMU) build --prefix $(PREFIX) $(PROMU_BINARIES)
|
||||
@$(PROMU) build --prefix $(PREFIX) $(PROMU_BINARIES) && \
|
||||
if [ "$(GOHOSTOS)" = "darwin" ] && command -v codesign > /dev/null 2>&1; then \
|
||||
codesign --sign - --force --preserve-metadata=entitlements,requirements,flags,runtime $(PREFIX) >/dev/null 2>&1; \
|
||||
fi
|
||||
|
||||
.PHONY: common-tarball
|
||||
common-tarball: promu
|
||||
|
|
Loading…
Reference in a new issue