mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-08 05:24:39 +01:00
add git version to file in assets/ so can tell .apk's version in
filesystem (before it's installed).
This commit is contained in:
parent
22dde029c8
commit
ba712046a2
3 changed files with 48 additions and 6 deletions
1
xwords4/android/XWords4/assets/.gitignore
vendored
Normal file
1
xwords4/android/XWords4/assets/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/gitvers.txt
|
|
@ -69,9 +69,14 @@
|
|||
<exec dir="." executable="../scripts/genvers.sh" output="/dev/null"
|
||||
failonerror="true">
|
||||
<arg value="${VARIANT_NAME}"/>
|
||||
<arg value="--client-vers"/>
|
||||
<arg value="${INITIAL_CLIENT_VERS}" />
|
||||
<arg value="--chat-enabled"/>
|
||||
<arg value="${CHAT_ENABLED}" />
|
||||
<arg value="--thumbnail-enabled"/>
|
||||
<arg value="${THUMBNAIL_ENABLED}" />
|
||||
<arg value="--vers-outfile" />
|
||||
<arg value="./assets/gitvers.txt" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
|
|
|
@ -3,24 +3,60 @@
|
|||
set -e -u
|
||||
|
||||
STRINGS_HASH=""
|
||||
OUT_PATH=""
|
||||
VARIANT=""
|
||||
CLIENT_VERS_RELAY=""
|
||||
CHAT_SUPPORTED=""
|
||||
THUMBNAIL_SUPPORTED=""
|
||||
|
||||
usage() {
|
||||
echo "usage: $0 <variant> <relay_vers> <chatSupported> <thumbSupported>"
|
||||
echo "usage: $0 --variant <variant> --client-vers <relay_vers> \\"
|
||||
echo " --chat-enabled <trueOrFalse> --thumbnail-enabled <trueOrFalse> \\"
|
||||
echo " [--vers-outfile path/to/versout.txt]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
[ $# -eq 4 ] || usage
|
||||
while [ $# -gt 0 ]; do
|
||||
echo $1
|
||||
case $1 in
|
||||
--variant)
|
||||
VARIANT=$2
|
||||
shift
|
||||
;;
|
||||
--client-vers)
|
||||
CLIENT_VERS_RELAY=$2
|
||||
shift
|
||||
;;
|
||||
--chat-enabled)
|
||||
CHAT_SUPPORTED=$2
|
||||
shift
|
||||
;;
|
||||
--thumbnail-enabled)
|
||||
THUMBNAIL_SUPPORTED=$2
|
||||
shift
|
||||
;;
|
||||
--vers-outfile)
|
||||
OUT_PATH=$2
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
VARIANT=$1
|
||||
CLIENT_VERS_RELAY=$2
|
||||
CHAT_SUPPORTED=$3
|
||||
THUMBNAIL_SUPPORTED=$4
|
||||
[ -n "$VARIANT" -a -n "$CLIENT_VERS_RELAY" -a -n "$CHAT_SUPPORTED" -a -n "$THUMBNAIL_SUPPORTED" ] || usage
|
||||
|
||||
BUILD_DIR=$(basename $(pwd))
|
||||
cd $(dirname $0)
|
||||
cd ../
|
||||
|
||||
GITVERSION=$(../scripts/gitversion.sh)
|
||||
if [ -n "$OUT_PATH" ]; then
|
||||
echo $GITVERSION > $BUILD_DIR/$OUT_PATH
|
||||
git describe >> $BUILD_DIR/$OUT_PATH
|
||||
fi
|
||||
|
||||
case $VARIANT in
|
||||
xw4)
|
||||
|
|
Loading…
Reference in a new issue