diff options
author | Gabriel Peal <gpeal@users.noreply.github.com> | 2018-08-05 16:53:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-05 16:53:54 -0700 |
commit | f675a5575db138e759f09e71806d1a913539ecd0 (patch) | |
tree | 1d4fce2eee7739ea4eb74f581c014f23e70fb135 /sign.sh | |
parent | afef4edf2e982da814c3afd7970754a221aca111 (diff) | |
download | lottie-f675a5575db138e759f09e71806d1a913539ecd0.tar.gz |
Sign and create releases on CI (#866)
Diffstat (limited to 'sign.sh')
-rwxr-xr-x | sign.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sign.sh b/sign.sh new file mode 100755 index 00000000..d44efee7 --- /dev/null +++ b/sign.sh @@ -0,0 +1,17 @@ +#! /bin/bash + +if [ -z "$TRAVIS_TAG" ]; then + # Only sign and deploy tags + echo "Not signing build. There is no git tag." + exit 0 +fi + +echo "----------Signing APK" +jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore lottie-upload-key.jks -storepass $LOTTIE_UPLOAD_CERT_KEY_STORE_PASSWORD LottieSample/build/outputs/apk/release/LottieSample-release-unsigned.apk upload -keypass $LOTTIE_UPLOAD_CERT_KEY_PASSWORD -signedjar LottieSample/build/outputs/apk/release/LottieSample-release-signed.apk + +if [ $? -ne 0 ]; then + exit $? +fi + +echo "----------Zipaligning APK" +${ANDROID_HOME}/build-tools/27.0.3/zipalign 4 LottieSample/build/outputs/apk/release/LottieSample-release-unsigned.apk LottieSample/build/outputs/apk/release/LottieSample-release-aligned.apk |