Created
April 10, 2014 07:30
-
-
Save martinth/10351747 to your computer and use it in GitHub Desktop.
A simple script to automate signing and aligning of APK files for upload to the Playstore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
FOLDER=android/bin | |
IN_APK_NAME=App-release-unsigned.apk | |
OUT_APK_NAME=App-release-signed-aligned.apk | |
KEYSTORE=release-key.keystore | |
KEYSTORE_ALIAS=app_release | |
echo ">>> Signing $OUT_APK_NAME..." | |
jarsigner -verbose -keystore $KEYSTORE "$FOLDER/$IN_APK_NAME" $KEYSTORE_ALIAS || exit $? | |
echo ">>> Checking if $IN_APK_NAME is verified..." | |
jarsigner -verify "$FOLDER/$IN_APK_NAME" || exit $? | |
echo ">>> Running zipalign to create $OUT_APK_NAME..." | |
zipalign -f 4 "$FOLDER/$IN_APK_NAME" "$FOLDER/$OUT_APK_NAME" || exit $? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment