-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
22 lines (18 loc) · 990 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
TARGETS = onair
VERSION = $(shell bash ./genVersion.sh)
RAWVERSION = $(shell bash ./)
onair: ifttt.go hue.go onair.go watcher.go go.mod go.sum
GOOS=darwin GOARCH=amd64 go build -ldflags='-extldflags "-sectcreate __TEXT __info_plist $(shell pwd)/Info.plist" -X "main.buildVersion=$(VERSION)"' -o $@
clean:
rm -rf $(TARGETS) _CodeSignature *.pkg package
.PHONY: sign
sign:
mkdir package
cp onair package
codesign -s B6AE7396AD644B78D62F4B970E92E661A7D97B44 -f -v --timestamp --options runtime ./package/onair
pkgbuild --root package --identifier net.pcable.onair --version $(VERSION:v%=%) --install-location /usr/local/bin onair-$(VERSION)-raw.pkg
productsign -s 49AE1F5CCA9DAA99F529F88AB06244821D3017AE --timestamp onair-$(VERSION)-raw.pkg onair-$(VERSION).pkg
xcrun altool --notarize-app --primary-bundle-id net.pcable.onair --username '[email protected]' --password "@keychain:appleid" --file onair-$(VERSION).pkg
.PHONY: staple
staple:
xcrun stapler staple onair-$(VERSION).pkg