Browse Source

fix android auto versionName update

QGC4.4
Daniel Agar 9 years ago
parent
commit
9ebd2bafa3
  1. 2
      android/AndroidManifest.xml
  2. 7
      tools/update_android_version.sh

2
android/AndroidManifest.xml

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
<?xml version="1.0"?>
<manifest package="org.mavlink.qgroundcontrol" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="v2.7.1-793-g39edb2e" android:versionCode="2103" android:installLocation="auto">
<manifest package="org.mavlink.qgroundcontrol" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.7.1-801-g075d5af" android:versionCode="2109" android:installLocation="auto">
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="-- %%INSERT_APP_NAME%% --" android:icon="@drawable/icon">
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="org.qgroundcontrol.qgchelper.UsbDeviceJNI" android:label="-- %%INSERT_APP_NAME%% --" android:screenOrientation="sensorLandscape" android:launchMode="singleTask">
<intent-filter>

7
tools/update_android_version.sh

@ -1,11 +1,12 @@ @@ -1,11 +1,12 @@
#! /bin/bash
MANIFEST_FILE=android/AndroidManifest.xml
VERSIONCODE=`git rev-list master --first-parent --count`
VERSIONNAME=`git describe --always --tags | sed -e 's/^v//'`
echo "VersionCode: ${VERSIONCODE}"
echo "VersionName: ${VERSIONNAME}"
sed -i -e "s/android:versionCode=\"[0-9][0-9]*\"/android:versionCode=\"${VERSIONCODE}\"/" android/AndroidManifest.xml
set -i -e "s/android:versionName=\".*\"/android:versionName=\"${VERSIONNAME}\"/" android/AndroidManifest.xml
sed -i -e "s/android:versionCode=\"[0-9][0-9]*\"/android:versionCode=\"${VERSIONCODE}\"/" $MANIFEST_FILE
sed -i -e 's/versionName *= *"[^"]*"/versionName="'$VERSIONNAME'"/' $MANIFEST_FILE

Loading…
Cancel
Save