forked from crdroidandroid/android_frameworks_support_lottie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sign.sh
executable file
·21 lines (15 loc) · 907 Bytes
/
sign.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /bin/bash
if [ -z "$TRAVIS_TAG" ]; then
# Only sign and deploy tags
echo "Not signing build. There is no git tag."
exit 0
fi
./gradlew :LottieSample:assembleRelease
./gradlew -PNEXUS_USERNAME=$NEXUS_USERNAME -PNEXUS_PASSWORD=$NEXUS_PASSWORD :lottie:uploadArchives
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-signed.apk LottieSample/build/outputs/apk/release/LottieSample-release-aligned.apk