From 54c0bdcdf0a8716f96b709f49e153426cc1d73e9 Mon Sep 17 00:00:00 2001 From: Max Prokhorov Date: Wed, 12 Dec 2018 04:33:44 +0300 Subject: [PATCH] Proper string test, strip any tag --- code/build.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/build.sh b/code/build.sh index ed9e59d4..e0c09644 100755 --- a/code/build.sh +++ b/code/build.sh @@ -33,9 +33,10 @@ else git_tag= fi -if [ ! -z $git_tag ]; then - version=${version/-dev} - sed -i -e "s@$version-dev@$version@" $version_file +if [[ -n $git_tag ]]; then + new_version=${version/-*} + sed -i -e "s@$version@$new_version@" $version_file + version=$new_version trap "git checkout -- $version_file" EXIT fi