@@ -37,15 +37,45 @@ build-macos: macos-iconset build-image-resource build-font-resource
37
37
pyinstaller --noconfirm " target/PyInstaller-macOS/Slice-macOS.spec"
38
38
cp LICENSE dist/license.txt
39
39
40
+ build-macos-installer :
41
+ # https://github.com/sindresorhus/create-dmg
42
+ - rm dist/* .dmg
43
+ cd dist && create-dmg --identity=" BOGUS" Slice.app
44
+
45
+ # -------------------------------------------
46
+ # macOS platform distribution code signatures
47
+ # -------------------------------------------
48
+
49
+ # code sign the application distribution bundle
40
50
codesign-macos :
41
- codesign --deep -s " Christopher Simpkins" dist/Slice.app
51
+ codesign --deep --timestamp --force --options runtime - s " Developer ID Application: Christopher Simpkins" dist/Slice.app
42
52
43
- codesign-macos-installer :
44
- codesign -s " Christopher Simpkins" dist/* .dmg
53
+ # verify code signature on the distribution bundle
54
+ verify-codesign-macos :
55
+ spctl -a -v dist/Slice.app
45
56
46
- build-macos-installer :
47
- # https://github.com/sindresorhus/create-dmg
48
- cd dist && create-dmg --overwrite Slice.app
57
+ # code sign the macOS installer
58
+ codesign-macos-installer :
59
+ codesign --timestamp --force --options runtime -s " Developer ID Application: Christopher Simpkins" dist/* .dmg
60
+
61
+ upload-macos-installer-for-notarize :
62
+ # Requires Apple Developer account user name to be exported as the environment variable
63
+ # APPLDEV_USERNAME before this target is executed
64
+ # This will prompt for an app-specific password to be entered in stdin
65
+ xcrun altool --notarize-app --type osx --primary-bundle-id " org.sourcefoundry.slice" --username @env:APPLEDEV_USERNAME --file dist/* .dmg
66
+
67
+ notarize-macos-installer :
68
+ # Must export the notarization ID returned by upload-macos-installer-for-notarize
69
+ # make target before this target is executed
70
+ xcrun altool --notarization-info @env:SLICE_NOTARIZE_ID --username @env:APPLEDEV_USERNAME
71
+
72
+ staple-notary-macos :
73
+ # requires successful notarize-macos-installer step completion
74
+ xcrun stapler staple -v dist/* .dmg
75
+
76
+ # verify code signature on the macOS installer
77
+ verify-notarize-macos-installer :
78
+ spctl -a -t open --context context:primary-signature -v dist/* .dmg
49
79
50
80
51
81
# -----------------------
0 commit comments