increment_version: Ensure higher version code than previous test builds

Change-Id: Ia48c13930ca1a26b43a4bb71fd642e0d7d139b60
This commit is contained in:
SpiritCroc 2021-01-16 18:44:33 +01:00
parent 4a95b69fcd
commit 9687bacd9a
1 changed files with 9 additions and 0 deletions

View File

@ -89,6 +89,15 @@ if [ "$release_type" = "test" ]; then
versionCode=$((previousVersionCode + 1))
else
versionCode=$((previousVersionCode + 10))
# Ensure the new version code is higher than the one of the last test version
if [ -f "$HOME/fdroid/sm/data/metadata/de.spiritcroc.riotx.a.yml" ]; then
lastTestVersionCode="$(cat "$HOME/fdroid/sm/data/metadata/de.spiritcroc.riotx.a.yml"|grep versionCode|tail -n 1|sed 's|.*: ||')"
else
read -p "Enter versionCode of last test version: " lastTestVersionCode
fi
while [ "$lastTestVersionCode" -ge "$versionCode" ]; do
versionCode=$((versionCode + 10))
done
fi