improvements to work with variants -- though jni still doesn't compile.

This commit is contained in:
Eric House 2012-03-02 05:49:25 -08:00
parent d2952794af
commit 542f10a3e5

View file

@ -3,13 +3,14 @@
set -e -u
usage () {
echo "usage: $(basename $0) [--tag tagname | --branch branchname]"
echo "usage: $(basename $0) [--tag tagname | --branch branchname] [--variant variant]"
echo " # (uses current branch as default)"
exit 0
}
TAG=""
BRANCH=""
VARIANT="XWords4"
while [ 0 -lt $# ] ; do
case $1 in
@ -21,6 +22,10 @@ while [ 0 -lt $# ] ; do
BRANCH=$2
shift
;;
--variant)
VARIANT=$2
shift
;;
*)
usage
;;
@ -28,6 +33,8 @@ while [ 0 -lt $# ] ; do
shift
done
echo "VARIANT=$VARIANT"
if [ -n "$TAG" ]; then
if ! git tag | grep -w "$TAG"; then
echo "tag $TAG not found"
@ -37,7 +44,7 @@ elif [ -z $BRANCH ]; then
BRANCH=$(git branch | grep '^*' | sed 's,^.* ,,')
fi
echo "building with ${TAG}${BRANCH}"
echo "building $VARIANT with ${TAG}${BRANCH}"
BUILDIR=/tmp/$(basename $0)_build_$$
SRCDIR=$(pwd)/$(dirname $0)/../../../
@ -49,9 +56,11 @@ cd $BUILDIR
git clone $SRCDIR BUILD
cd BUILD
git checkout ${TAG}${BRANCH}
./xwords4/android/scripts/setup_local_props.sh
./xwords4/android/scripts/arelease.sh
cp *.apk /tmp
cd ./xwords4/android/${VARIANT}
../scripts/setup_local_props.sh
../scripts/arelease.sh --variant ${VARIANT}
mkdir /tmp/releases_${VARIANT}
cp *.apk /tmp/releases_${VARIANT}
cd $CURDIR
rm -rf $BUILDIR