File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,13 @@ touch dist/installdir
47
47
48
48
mkdir -p dist/temp
49
49
50
+ # Sign the app if environment variables are set
51
+ if [ -n " $CODE_SIGN_ENABLED " ] && [ -n " $APPLE_DEV_ID " ]; then
52
+ echo " Signing $APPNAME .app with ID: $APPLE_DEV_ID "
53
+ SIGN_MSG=" Developer ID Application: $APPLE_DEV_ID "
54
+ codesign --deep --force --verbose --sign " $SIGN_MSG " --options runtime dist/installdir/$APPNAME .app
55
+ fi
56
+
50
57
# create image
51
58
hdiutil create -fs HFS+ -srcfolder dist/installdir -format UDRW -scrub -volname ${APPNAME} dist/$APPNAME .dmg
52
59
@@ -109,3 +116,10 @@ python3 ./build/mac/licenseDMG.py dist/$APPNAME.dmg LICENSE
109
116
if [ ! -z " $DMGNAME " ]; then
110
117
mv dist/$APPNAME .dmg dist/$DMGNAME .dmg
111
118
fi
119
+
120
+ # Sign the dmg package and verify it
121
+ if [ -n " $CODE_SIGN_ENABLED " ] && [ -n " $APPLE_DEV_ID " ]; then
122
+ codesign --force --verify --verbose --sign " $SIGN_MSG " dist/$DMGNAME .dmg
123
+ codesign --verify --verbose=4 dist/$DMGNAME .dmg
124
+ spctl --assess --type open --context context:primary-signature -v dist/$DMGNAME .dmg
125
+ fi
You can’t perform that action at this time.
0 commit comments