This repository has been archived on 2024-06-08. You can view files and clone it, but cannot push or open issues or pull requests.
tachiyomi/.travis/build.sh

23 lines
789 B
Bash
Raw Normal View History

#!/bin/bash
2017-09-30 14:40:44 -04:00
git fetch --unshallow #required for commit count
2018-04-25 07:46:57 -04:00
cp .travis/google-services.json app/
if [ -z "$TRAVIS_TAG" ]; then
2017-10-28 11:01:17 -04:00
./gradlew clean assembleStandardDebug
COMMIT_COUNT=$(git rev-list --count HEAD)
export ARTIFACT="tachiyomi-r${COMMIT_COUNT}.apk"
2017-10-28 11:01:17 -04:00
mv app/build/outputs/apk/standard/debug/app-standard-debug.apk $ARTIFACT
else
2017-10-28 11:01:17 -04:00
./gradlew clean assembleStandardRelease
2017-11-27 18:21:38 -05:00
TOOLS="$(ls -d ${ANDROID_HOME}/build-tools/* | tail -1)"
export ARTIFACT="tachiyomi-${TRAVIS_TAG}.apk"
${TOOLS}/zipalign -v -p 4 app/build/outputs/apk/standard/release/app-standard-release-unsigned.apk app-aligned.apk
${TOOLS}/apksigner sign --ks $STORE_PATH --ks-key-alias $STORE_ALIAS --ks-pass env:STORE_PASS --key-pass env:KEY_PASS --out $ARTIFACT app-aligned.apk
fi