diff --git a/xwords4/android/scripts/arelease-clone.sh b/xwords4/android/scripts/arelease-clone.sh index 05c7dda9e..872102993 100755 --- a/xwords4/android/scripts/arelease-clone.sh +++ b/xwords4/android/scripts/arelease-clone.sh @@ -2,9 +2,13 @@ set -e -u +VARIANT=Xw4 + usage () { - echo "usage: $(basename $0) [--tag tagname | --branch branchname] " + echo "usage: $(basename $0) [--tag tagname | --branch branchname] \\" + echo " [--variant VARIANT] # default value: $VARIANT \\" echo " # (uses current branch as default)" + echo " # e.g. $0 --tag android_beta_141 --variant Xw4d" exit 1 } @@ -21,6 +25,10 @@ while [ 0 -lt $# ] ; do BRANCH=$2 shift ;; + --variant) + VARIANT=$2 + shift + ;; *) usage ;; @@ -51,9 +59,9 @@ git clone $SRCDIR BUILD cd BUILD git checkout ${TAG}${BRANCH} cd ./xwords4/android/ -./scripts/arelease.sh --apk-list $OUT_FILE +./scripts/arelease.sh --apk-list $OUT_FILE --variant $VARIANT mkdir -p /tmp/releases -cp app/build/outputs/apk/xw4/release/*.apk /tmp/releases +cp app/build/outputs/apk/*/release/*.apk /tmp/releases if [ -n "$XW_RELEASE_SCP_DEST" ]; then cat $OUT_FILE | while read APK; do diff --git a/xwords4/android/scripts/arelease.sh b/xwords4/android/scripts/arelease.sh index 1493bb26a..cc4f4adf4 100755 --- a/xwords4/android/scripts/arelease.sh +++ b/xwords4/android/scripts/arelease.sh @@ -2,6 +2,7 @@ set -u -e +VARIANT=Xw4 TAGNAME="" FILES="" LIST_FILE='' @@ -10,12 +11,14 @@ XW_RELEASE_SCP_DEST=${XW_RELEASE_SCP_DEST:-""} usage() { echo "Error: $*" >&2 - echo "usage: $0 [--tag ] [--apk-list path/to/out.txt] []" >&2 + echo "usage: $0 [--tag ] [--apk-list path/to/out.txt] \\" + echo " [--variant VARIANT] # default value: $VARIANT \\" + echo " []" >&2 exit 1 } do_build() { - (cd $(dirname $0)/../ && ./gradlew clean assembleXw4Rel) + (cd $(dirname $0)/../ && ./gradlew clean as${VARIANT}Rel) } while [ "$#" -gt 0 ]; do @@ -30,6 +33,10 @@ while [ "$#" -gt 0 ]; do > $LIST_FILE shift ;; + --variant) + VARIANT=$2 + shift + ;; --help) usage ;; @@ -54,7 +61,7 @@ fi if [ -z "$FILES" ]; then do_build - for f in $(dirname $0)/../app/build/outputs/apk/xw4/release/*-unsigned-*.apk; do + for f in $(ls $(dirname $0)/../app/build/outputs/apk/*/release/*-release-unsigned-*.apk); do $(dirname $0)/sign-align.sh --apk $f done fi