-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
38 lines (31 loc) · 968 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
VERSION = 1.5
PRODUCT = NetworkWatcher
BINARY = NetworkWatcher
SWIFT_OUT = .build/apple/Products/Release/${PRODUCT}
CODESIGN_IDENTITY = "Developer ID Application: University of Michigan (D9GZK3CLYY)"
BUNDLE_ID = edu.umich.its.${PRODUCT}
NOTARYTOOL_PROFILE = umich-edu
Binaries/${BINARY}:
-swift build -c release --product ${PRODUCT} --arch arm64 --arch x86_64
xcrun codesign -s ${CODESIGN_IDENTITY} \
--options=runtime \
--timestamp \
${SWIFT_OUT}
rm -rf out || true
mkdir -p Binaries
cp ${SWIFT_OUT} Binaries/${BINARY}
.PHONY: build
build: Binaries/${BINARY}
.PHONY: dmg
dmg: ${BINARY}.dmg
${BINARY}.dmg:
hdiutil create -volname "${PRODUCT}" -srcfolder "Binaries" -ov -format UDZO "${BINARY}.dmg"
xcrun notarytool \
submit \
--wait \
--keychain-profile ${NOTARYTOOL_PROFILE} \
"${BINARY}.dmg"
xcrun stapler staple "${BINARY}.dmg"
.PHONY: clean
clean:
rm -rf Packages Binaries .build ${BINARY}.dmg