From 8286c9c1161fc181f5c17f0bf1de5f891ac9dcae Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 1 Aug 2018 07:48:02 -0700 Subject: [PATCH] new script for when release builds required --- xwords4/android/scripts/build-install-rel.sh | 36 ++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 xwords4/android/scripts/build-install-rel.sh diff --git a/xwords4/android/scripts/build-install-rel.sh b/xwords4/android/scripts/build-install-rel.sh new file mode 100755 index 000000000..93ca83041 --- /dev/null +++ b/xwords4/android/scripts/build-install-rel.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +set -e -u + +usage() { + [ $# -gt 0 ] && echo "ERROR: $1" + echo "usage: $0 [--clean|--help]" + + echo "meant for rapid work where a release build's required, this" + echo "builds, signs, and installs a Rel build of the xw4 variant" + exit 1 +} + +CLEAN='' + +while [ $# -gt 0 ]; do + case $1 in + --clean) + CLEAN=clean + ;; + --help) + usage + ;; + *) + usage "unexpected command $1" + ;; + esac + shift +done + +cd $(dirname $0)/.. +pwd + +./gradlew $CLEAN asXw4Rel +./scripts/sign-align.sh --apk $(find app/build -name '*xw4-release-unsigned-*.apk') +adb install -r $(find app/build -name '*xw4-release-signed-*.apk')