Fix a warning in the gradlew script

This commit is contained in:
Michael Zanetti 2021-01-08 20:03:50 +01:00
parent 28a3eef27d
commit 7679e5f909

View File

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