Make detecting version more reliable

The docker bash scripts try to get the version from sbt, without
calling sbt but reading the files. This was relying on a specific
position. It is now a bit more robust.
This commit is contained in:
Eike Kettner
2021-04-12 00:42:48 +02:00
parent cb522ee6eb
commit df543a3e92
3 changed files with 4 additions and 12 deletions

View File

@@ -5,12 +5,8 @@ if [ $# -eq 1 ]; then
REPO=$1
fi
SBT_VERSION=$(grep sbt.version ../project/build.properties)
SBT_VERSION=${SBT_VERSION:12:99}
TMP_VERSION=$(cat ../version.sbt)
TMP_VERSION=${TMP_VERSION:25:99}
VERSION=${TMP_VERSION%\"}
SBT_VERSION=$(grep sbt.version ../project/build.properties|cut -d'=' -f2|xargs)
VERSION=$(cat ../version.sbt | cut -d'=' -f2 | tr -d '"'|xargs)
if [[ $VERSION == *"SNAPSHOT" ]]; then
VERSION=SNAPSHOT