-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildRelease.sh
executable file
·49 lines (37 loc) · 1.01 KB
/
buildRelease.sh
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
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env zsh
xcodebuild \
-project Epigraver.xcodeproj \
-target Epigraver \
-configuration Release
[[ -f Epigraver.dmg ]] && rm Epigraver.dmg
mkdir dmg_source
cp assets/dmgbackground*.png .
create-dmg \
--no-internet-enable \
--volname "Epigraver" \
--icon-size 64 \
--background "dmgbackground.png" \
--window-pos 300 200 \
--window-size 400 352 \
--text-size 14 \
--add-file "Epigraver.saver" "build/Release/Epigraver.saver" 200 190 \
"Epigraver.dmg" \
"dmg_source/"
rmdir dmg_source
rm dmgbackground*.png
if [[ -z "${EPIGRAVER_DMG_SIGNER}" ]]
then
echo "DMG signer missing"
exit 1
fi
echo "Signing DMG"
codesign -s "${EPIGRAVER_DMG_SIGNER}" Epigraver.dmg --options runtime
if [[ -z "${EPIGRAVER_NOTARIZATION_KEYCHAIN_PROFILE}" ]]
then
echo "Notarization keychain profile missing"
exit 1
fi
xcrun notarytool submit Epigraver.dmg \
--keychain-profile "${EPIGRAVER_NOTARIZATION_KEYCHAIN_PROFILE}" \
--wait
xcrun stapler staple "Epigraver.dmg"