From 3b019a3620c8a5a21915a4331fdab0cc63bb323b Mon Sep 17 00:00:00 2001
From: Mirco Nasuti <mirco.nasuti@chuv.ch>
Date: Mon, 8 May 2017 15:17:40 +0200
Subject: [PATCH] Latest version in publish script

---
 publish.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/publish.sh b/publish.sh
index b11db6e54..d2738c36a 100755
--- a/publish.sh
+++ b/publish.sh
@@ -60,8 +60,7 @@ select_part() {
 git pull --tags
 # Look for a version tag in Git. If not found, ask the user to provide one
 [ $(git tag --points-at HEAD | wc -l) == 1 ] || (
-  latest_version=$(git describe --abbrev=00 || \
-    (bumpversion --dry-run --list patch | grep current_version | sed -r s,"^.*=",,) || echo '0.0.1')
+  latest_version=$( (bumpversion --dry-run --list patch | grep current_version | sed -r s,"^.*=",,) || echo '0.0.1')
   echo
   echo "Current commit has not been tagged with a version. Latest known version is $latest_version."
   echo
-- 
GitLab