Ouss4 commented on issue #2529: URL: https://github.com/apache/incubator-nuttx/issues/2529#issuecomment-744085041
> Maybe a solution is to check with something like git describe first then go to the list of tags? Tried the following, seems to work. ```diff diff --git a/tools/version.sh b/tools/version.sh index fd815daa91..0a1afac697 100755 --- a/tools/version.sh +++ b/tools/version.sh @@ -86,7 +86,11 @@ done OUTFILE=$1 if [ -z ${VERSION} ] ; then - VERSION=`git -C ${WD} tag --sort=taggerdate | tail -1 | cut -d'-' -f2` + VERSION=`git -C ${WD} describe --exact-match 2>/dev/null | tail -1 | cut -d'-' -f2` + + if [ -z ${VERSION} ] ; then + VERSION=`git tag -l --sort=v:refname | tail -1 | cut -d'-' -f2` + fi # Earlier tags used the format "major.minor", append a "0" for a patch. ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org