mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-08 05:24:39 +01:00
add variant option to build scripts
xw4 won't build for a while...
This commit is contained in:
parent
6aad6d259b
commit
305f45dfc0
2 changed files with 21 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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 <name>] [--apk-list path/to/out.txt] [<package-unsigned.apk>]" >&2
|
||||
echo "usage: $0 [--tag <name>] [--apk-list path/to/out.txt] \\"
|
||||
echo " [--variant VARIANT] # default value: $VARIANT \\"
|
||||
echo " [<package-unsigned.apk>]" >&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
|
||||
|
|
Loading…
Reference in a new issue