0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 03:52:15 +02:00

Fixed script for cases where prefix is empty

This commit is contained in:
Nicolas Raoul 2012-07-18 13:25:57 +09:00
parent ca564ff4ba
commit 64255f5a7f

View File

@ -6,13 +6,16 @@
# If no option given, will guess the next version number.
# Suffix configuration
#SUFFIX=""
SUFFIX="-EXPERIMENTAL"
SUFFIX=""
#SUFFIX="-EXPERIMENTAL"
set -x
# Version number to use
PREVIOUS_VERSION=`grep android:versionName AndroidManifest.xml | sed -e 's/.*="//' | sed -e 's/".*//' | sed -e "s/$SUFFIX//g"`
PREVIOUS_VERSION=`grep android:versionName AndroidManifest.xml | sed -e 's/.*="//' | sed -e 's/".*//'`
if [ -n "$SUFFIX" ]; then
PREVIOUS_VERSION=`echo $PREVIOUS_VERSION | sed -e "s/$SUFFIX//g"`
fi
GUESSED_VERSION=`echo $PREVIOUS_VERSION | gawk -f tools/lib/increase-version.awk`
VERSION=${1:-$GUESSED_VERSION$SUFFIX}