@@ -17,6 +17,33 @@ echoDots(){
17
17
done
18
18
}
19
19
20
+ package_app (){
21
+ if [[ " ${GITHUB_REF##*/ } " == " master" && -z " ${GITHUB_HEAD_REF} " ]] ; then
22
+
23
+ PLATFORM=$1
24
+ # Copy commandLine into electron .app
25
+ cd ${pg_root}
26
+ cp commandLine/bin/projectGenerator projectGenerator-$PLATFORM /projectGenerator.app/Contents/Resources/app/app/projectGenerator 2> /dev/null
27
+
28
+ sed -i -e " s/osx/$PLATFORM /g" projectGenerator-$PLATFORM /projectGenerator.app/Contents/Resources/app/settings.json
29
+
30
+ # Sign app
31
+ echo " Signing electron .app"
32
+ cd ${pg_root}
33
+ xattr -cr projectGenerator-$PLATFORM /projectGenerator.app
34
+
35
+ electron-osx-sign projectGenerator-$PLATFORM /projectGenerator.app --platform=darwin --type=distribution --no-gatekeeper-assess --hardened-runtime --entitlements=scripts/osx/PG.entitlements --entitlements-inherit=scripts/osx/PG.entitlements
36
+
37
+ echo " Compressing PG app"
38
+ zip --symlinks -r -q projectGenerator-$PLATFORM .zip projectGenerator-$PLATFORM
39
+
40
+ # need to upload zip of just app to apple for notarizing
41
+ zip --symlinks -r -q projectGenerator-$PLATFORM /projectGenerator.app.zip projectGenerator-$PLATFORM /projectGenerator.app
42
+ xcrun altool --notarize-app --primary-bundle-id " com.electron.projectgenerator" --username " ${GA_APPLE_USERNAME} " -p " ${GA_APPLE_PASS} " --asc-provider " ${GA_NOTARIZE_PROVIDER} " --file projectGenerator-$PLATFORM /projectGenerator.app.zip
43
+
44
+ fi
45
+ }
46
+
20
47
21
48
sign_and_upload (){
22
49
PLATFORM=$1
@@ -180,17 +207,17 @@ npm update
180
207
npm install > /dev/null
181
208
npm run build:osx > /dev/null
182
209
mv dist/projectGenerator-darwin-x64 ${pg_root} /projectGenerator-osx
183
- sign_and_upload osx
210
+ package_app osx
184
211
185
212
cd ${pg_root} /frontend
186
213
npm run build:osx > /dev/null
187
214
mv dist/projectGenerator-darwin-x64 ${pg_root} /projectGenerator-ios
188
- sign_and_upload ios
215
+ package_app ios
189
216
190
- cd ${pg_root} /frontend
191
- npm run build:osx > /dev/null
192
- mv dist/projectGenerator-darwin-x64 ${pg_root} /projectGenerator-android
193
- sign_and_upload android
217
+ # cd ${pg_root}/frontend
218
+ # npm run build:osx > /dev/null
219
+ # mv dist/projectGenerator-darwin-x64 ${pg_root}/projectGenerator-android
220
+ # package_app android
194
221
195
222
rm -rf scripts/id_rsa 2> /dev/null
196
223
rm -rf scripts/* .p12 2> /dev/null
0 commit comments