diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-03-05 21:23:27 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-03-05 21:23:27 -0800 |
commit | e9e453b009dd3af1bb22974f50c3c95b11deb9cb (patch) | |
tree | 865fa8dddf447eb60311b0bfbb9c81c96482929d | |
parent | a64eef7f82a69652a56f2a4c752c1e9cb533694e (diff) | |
download | subsurface-e9e453b009dd3af1bb22974f50c3c95b11deb9cb.tar.gz |
Android build: pass in build nr
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | android-mobile/AndroidManifest.xml | 2 | ||||
-rw-r--r-- | packaging/android/build.sh | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/android-mobile/AndroidManifest.xml b/android-mobile/AndroidManifest.xml index e597a6ccd..8fa0c5e83 100644 --- a/android-mobile/AndroidManifest.xml +++ b/android-mobile/AndroidManifest.xml @@ -2,7 +2,7 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.subsurfacedivelog.mobile" android:installLocation="auto" - android:versionCode="1" + android:versionCode=@BUILD_NR@ android:versionName=@SUBSURFACE_MOBILE_VERSION@ > <application diff --git a/packaging/android/build.sh b/packaging/android/build.sh index 7b522b5df..3ca68eb2d 100644 --- a/packaging/android/build.sh +++ b/packaging/android/build.sh @@ -18,6 +18,12 @@ if [ "$1" = "debug" ] || [ "$1" = "Debug" ] ; then shift fi +if [ "$1" = "-buildnr" ] ; then + shift + BUILD_NR="\"$1\"" + shift +fi + # Configure where we can find things here export ANDROID_NDK_ROOT=$SUBSURFACE_SOURCE/../android-ndk-r10e @@ -352,7 +358,7 @@ sed -i -e "s/-lcrypto//g" CMakeFiles/subsurface-mobile.dir/link.txt SUBSURFACE_MOBILE_VERSION=$(grep MOBILE_VERSION_STRING ssrf-version.h | awk "{ print \$3 }" ) rm -rf android-mobile cp -a $SUBSURFACE_SOURCE/android-mobile . -sed -i -e "s/@SUBSURFACE_MOBILE_VERSION@/$SUBSURFACE_MOBILE_VERSION/" android-mobile/AndroidManifest.xml +sed -i -e "s/@SUBSURFACE_MOBILE_VERSION@/$SUBSURFACE_MOBILE_VERSION/;s/@BUILD_NR@/$BUILD_NR/" android-mobile/AndroidManifest.xml # now build Subsurface and use the rest of the command line arguments make $@ |