mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-27 07:58:49 +01:00
improvements to work with variants -- though jni still doesn't compile.
This commit is contained in:
parent
d2952794af
commit
542f10a3e5
1 changed files with 14 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue