Refactor Makefile to include MacOS Application Signing
This commit is contained in:
parent
896e52a52a
commit
39bbdbd1b7
1 changed files with 6 additions and 0 deletions
6
Makefile
6
Makefile
|
|
@ -7,6 +7,7 @@ GOFILES := $(shell find . -name "*.go")
|
|||
VERSION := $(shell grep 'const VERSION =' share/const.go |awk '{print $$4}' |sed 's/\"//g')
|
||||
COMMIT := $(shell git log | head -n 1 | awk '{print substr($$2, 0, 12)}')
|
||||
NOW := $(shell date +"%FT%T%z")
|
||||
OS := $(shell uname)
|
||||
|
||||
# ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
TESTFOLDER := $(shell $(GO) list ./... | grep -vE 'examples|tests|openai|aigc|neo|share*')
|
||||
|
|
@ -334,6 +335,11 @@ release: clean
|
|||
CGO_ENABLED=1 go build -v -o dist/release/yao
|
||||
chmod +x dist/release/yao
|
||||
|
||||
# MacOS Application Signing
|
||||
@if [ "$(OS)" = "Darwin" ]; then \
|
||||
codesign --deep --force --verify --verbose --sign "${APPLE_SIGN}" dist/release/yao ; \
|
||||
fi
|
||||
|
||||
# Reset const
|
||||
cp -f share/const.goe share/const.go
|
||||
rm share/const.goe
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue