-
Notifications
You must be signed in to change notification settings - Fork 2
/
build-all-for-release.sh
32 lines (24 loc) · 1.53 KB
/
build-all-for-release.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
#!/bin/sh
echo "[ LQDI-BUILDBOT ] Scaffolding environment...";
mv src/env_api_root.ts src/env_api_root.bck.ts
cp src/env_api_root_release.ts src/env_api_root.ts
echo "[ LQDI-BUILDBOT ] Cleaning Cordova builds...";
cordova clean
echo "[ LQDI-BUILDBOT ] Building IOS...";
rm ./release/ios-release-ready.ipa
ionic build ios --device --release
cp ./platforms/ios/build/device/Busca\ Ativa\ Escolar.ipa ./release/ios-release-ready.ipa
echo "[ LQDI-BUILDBOT ] Building ANDROID...";
rm ./release/android-release-pending.apk
rm ./release/android-release-ready.apk
ionic build android --device --release
echo "[ LQDI-BUILDBOT ] Signing APK for ANDROID...";
cp ./platforms/android/build/outputs/apk/android-release-unsigned.apk ./release/android-release-pending.apk
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -tsa https://tsa.safecreative.org -keystore ~/Dropbox/SSH/google_play_keystore.jks -storepass ":%_x3^1%._Q49%1m" -keypass "#eYYG%+ISH5w" ./release/android-release-pending.apk busca-ativa-escolar_2017
zipalign -v 4 ./release/android-release-pending.apk ./release/android-release-ready.apk
echo "iOS Package generation done! Uploading iOS IPA to Itunes Connect..."
altool --upload-app -f ./platforms/ios/build/device/Busca\ Ativa\ Escolar.ipa -u [email protected] -p p8HDjI4jTWw5
echo "[ LQDI-BUILDBOT ] De-scaffolding environment...";
rm src/env_api_root.ts
mv src/env_api_root.bck.ts src/env_api_root.ts
echo "[ LQDI-BUILDBOT ] Done! Now you must upload the APK to Play Store and update the current used build for TestFlight/GA in Itunes Connect."