Merge pull request #754 from trheyi/main
Refactor Makefile to include MacOS Application Signing
This commit is contained in:
commit
2aabd0446c
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')
|
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)}')
|
COMMIT := $(shell git log | head -n 1 | awk '{print substr($$2, 0, 12)}')
|
||||||
NOW := $(shell date +"%FT%T%z")
|
NOW := $(shell date +"%FT%T%z")
|
||||||
|
OS := $(shell uname)
|
||||||
|
|
||||||
# ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
# ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||||
TESTFOLDER := $(shell $(GO) list ./... | grep -vE 'examples|tests|openai|aigc|neo|share*')
|
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
|
CGO_ENABLED=1 go build -v -o dist/release/yao
|
||||||
chmod +x 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
|
# Reset const
|
||||||
cp -f share/const.goe share/const.go
|
cp -f share/const.goe share/const.go
|
||||||
rm share/const.goe
|
rm share/const.goe
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue