You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/12/17 09:25:41 UTC

[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #2557: tools/version.sh: Fix the version retrieved from GIT.

Ouss4 commented on a change in pull request #2557:
URL: https://github.com/apache/incubator-nuttx/pull/2557#discussion_r544935777



##########
File path: 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`

Review comment:
       Thanks, fixed.




----------------------------------------------------------------
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:
users@infra.apache.org