add revision info to version.txt

pull/15/head
Michael Zanetti 2018-07-07 15:27:19 +02:00
parent fbedf4d652
commit eba33f80db
3 changed files with 10 additions and 3 deletions

View File

@ -5,6 +5,10 @@ QMAKE_CXXFLAGS += -Wall
top_srcdir=$$PWD
top_builddir=$$shadowed($$PWD)
APP_VERSION=$$cat(version.txt)
VERSION_INFO=$$cat(version.txt)
APP_VERSION=$$member(VERSION_INFO, 0)
APP_REVISION=$$member(VERSION_INFO, 1)
message("APP_VERSION: $${APP_VERSION} ($${APP_REVISION})")
DEFINES+=APP_VERSION=\\\"$${APP_VERSION}\\\"
android:QMAKE_POST_LINK += cp $$top_srcdir/version.txt $$top_builddir/

View File

@ -1,7 +1,9 @@
#!/bin/sh
BASEDIR=$(dirname "$0")
MEA_VERSION=`cat $BASEDIR/../version.txt`
echo "Setting version to $MEA_VERSION"
MEA_VERSION=`cat $BASEDIR/../version.txt | head -n 1`
MEA_VERSION_CODE=`cat $BASEDIR/../version.txt | head -n 2 | tail -n 1`
echo "Setting version to $MEA_VERSION ($MEA_VERSION_CODE)"
sed -i "s/android:versionName=\"[0-9\.a-zA-Z$_]*\"/android:versionName=\"$MEA_VERSION\"/" AndroidManifest.xml
sed -i "s/android:versionCode=\"[0-9]*\"/android:versionCode=\"$MEA_VERSION_CODE\"/" AndroidManifest.xml
./gradlew.upstream $@

View File

@ -1 +1,2 @@
1.0.35
1