mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
0a3851fba2
Working around TravisCI having killed my builds
43 lines
846 B
Bash
Executable file
43 lines
846 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -e -u
|
|
|
|
TMPDIR=/tmp/ci-build-$$
|
|
|
|
usage() {
|
|
[ -n "$1" ] && echo "ERROR: $1"
|
|
echo "**************************************"
|
|
echo "*** Nobody but me will use this!!! ***"
|
|
echo "**************************************"
|
|
echo "usage: $0 <no args>"
|
|
echo "does a clean build of committed HEAD and uploads to eehouse.org"
|
|
echo "same as TravisCI does when working"
|
|
exit 1
|
|
}
|
|
|
|
[ -z "${1+x}" ] || usage "takes no args"
|
|
[ -z "${XW4D_UPLOAD+x}" ] && usage "XW4D_UPLOAD not defined"
|
|
|
|
REPO=''
|
|
while :; do
|
|
if [ -f .travis.yml ]; then
|
|
REPO=$(pwd)
|
|
break
|
|
fi
|
|
cd ../
|
|
done
|
|
|
|
mkdir -p $TMPDIR
|
|
cd $TMPDIR
|
|
git clone $REPO
|
|
for BUILD in $(find . -name build.gradle); do
|
|
DIR=$(basename $(dirname $BUILD))
|
|
if [ "$DIR" == "android" ]; then
|
|
cd $(dirname $BUILD)
|
|
break
|
|
fi
|
|
done
|
|
pwd
|
|
|
|
./gradlew asXw4dDeb
|
|
scp $(find . -name '*.apk') ${XW4D_UPLOAD}
|