Skip to content

Instantly share code, notes, and snippets.

@DavidFrahm
Last active February 22, 2017 12:15
Show Gist options
  • Select an option

  • Save DavidFrahm/a6d573273279e9b69754 to your computer and use it in GitHub Desktop.

Select an option

Save DavidFrahm/a6d573273279e9b69754 to your computer and use it in GitHub Desktop.
Ionic build Android app for release, with option to open (in app such as HockeyApp for deploying to team)
#!/bin/bash
echo "Building Ionic/Cordova Android release..."
ionic build --release android
echo "Signing APK..."
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ~/Library/Android/myapp-release-key.keystore -storepass mypassword platforms/android/ant-build/CordovaApp-release-unsigned.apk myapp
echo "Optimizing APK (zipalign)..."
~/Library/Android/sdk/build-tools/21.1.1/zipalign -v -f 4 platforms/android/ant-build/CordovaApp-release-unsigned.apk platforms/MyApp.apk
echo "Opening APK (in HockeyApp)..."
open platforms/MyApp.apk
echo "Done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment