We are hiring ! See our job offers.
Revision b4052e61857a54a5608e92494b6cdfa26bd22b22 authored by muncus@gmail.com on 21 January 2012, 19:34:49 UTC, committed by muncus@gmail.com on 21 January 2012, 19:34:49 UTC
git-svn-id: https://klaxon.googlecode.com/svn/trunk@144 c4afc712-db7e-11dd-87b6-9d1a99559f42
1 parent 108246e
Raw File
signrelease.sh
#!/bin/bash
# sign a klaxon release.

KEYSTORE="release-keys.keystore"
KEY_ALIAS="klaxon"

APK_FILE="bin/Klaxon-unsigned.apk"

# a nice suffix for a release version.
VERSION_NAME=`grep versionName AndroidManifest.xml | awk -F\" '{print $2}'`

SIGNED_APK_FILENAME="Klaxon-${VERSION_NAME}.apk"

jarsigner -verbose -keystore $KEYSTORE $APK_FILE $KEY_ALIAS

jarsigner -verify $APK_FILE | grep -i -q "jar verified"
ok=$?

if [[ $ok == 0 ]]; then
    echo "copying ${APK_FILE} to ${SIGNED_APK_FILENAME}"
    cp ${APK_FILE} ${SIGNED_APK_FILENAME}
fi
back to top