Skip to content

Commit

Permalink
Refactor Makefile to include MacOS Application Signing
Browse files Browse the repository at this point in the history
  • Loading branch information
trheyi committed Sep 28, 2024
1 parent 896e52a commit 39bbdbd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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*')
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 39bbdbd

Please sign in to comment.