File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,33 @@ if [ "${build_classical}" == "1" ]; then
145
145
zip -q -9 -r " ${reldir} /${binname} .zip" Godot.app
146
146
rm -rf Godot.app
147
147
148
+ if [ ! -z " ${OSX_HOST} " ]; then
149
+ osx_tmpdir=$( ssh " ${OSX_HOST} " " mktemp -d" )
150
+
151
+ scp " ${reldir} /${binname} .zip" " ${OSX_HOST} :${osx_tmpdir} "
152
+ ssh " ${OSX_HOST} " "
153
+ cd ${osx_tmpdir} && \
154
+ unzip ${binname} .zip &&\
155
+ codesign --timestamp --options=runtime -s ${OSX_KEY_ID} -v Godot.app/Contents/MacOS/Godot && \
156
+ zip -r ${binname} _signed.zip Godot.app"
157
+
158
+ request_uuid=$( ssh " ${OSX_HOST} " " xcrun altool --notarize-app --primary-bundle-id \" ${OSX_BUNDLE_ID} \" --username \" ${APPLE_ID} \" --password \" ${APPLE_ID_PASSWORD} \" --file ${osx_tmpdir} /${binname} _signed.zip" )
159
+ request_uuid=$( echo ${request_uuid} | sed -e ' s/.*RequestUUID = //' )
160
+ ssh " ${OSX_HOST} " " while xcrun altool --notarization-history 0 -u \" ${APPLE_ID} \" -p \" ${APPLE_ID_PASSWORD} \" | grep -q ${request_uuid} .*in\ progress; do echo Waiting on Apple signature; sleep 30s; done"
161
+ if ! ssh " ${OSX_HOST} " " xcrun altool --notarization-history 0 -u \" ${APPLE_ID} \" -p \" ${APPLE_ID_PASSWORD} \" | grep -q ${request_uuid} .*success" ; then
162
+ echo " Signing failed?"
163
+ ssh " ${OSX_HOST} " " rm -rf ${osx_tmpdir} "
164
+ exit 1
165
+ else
166
+ ssh " ${OSX_HOST} " "
167
+ cd ${osx_tmpdir} && \
168
+ xcrun stapler staple Godot.app && \
169
+ zip -r ${binname} _stapled.zip Godot.app"
170
+ scp " ${OSX_HOST} :${osx_tmpdir} /${binname} _stapled.zip" ${reldir} /${binname} .zip
171
+ ssh " ${OSX_HOST} " " rm -rf ${osx_tmpdir} "
172
+ fi
173
+ fi
174
+
148
175
# Templates
149
176
rm -rf osx_template.app
150
177
cp -r git/misc/dist/osx_template.app .
Original file line number Diff line number Diff line change @@ -27,3 +27,15 @@ export SIGN_PASSWORD=""
27
27
# Use your own when making a thirdparty build.
28
28
export SIGN_NAME=" "
29
29
export SIGN_URL=" "
30
+
31
+ # Hostname or IP address of an OSX host (Needed for signing)
32
+
33
+ export OSX_HOST=" "
34
+ # ID of the Apple certificate used to sign
35
+ export OSX_KEY_ID=" "
36
+ # Bundle id for the signed app
37
+ export OSX_BUNDLE_ID=" "
38
+ # Username/password for Apple's signing APIs (used for atltool)
39
+ export APPLE_ID=" "
40
+ export APPLE_ID_PASSWORD=" "
41
+
You can’t perform that action at this time.
0 commit comments