tools/version.sh: Fix the version retrieved from git-tag

Fix an issue the wrong version could be retrieved from a private tag.
This commit is contained in:
kzhioki
2021-01-03 16:37:39 +09:00
committed by Xiang Xiao
parent 14a3c35917
commit 223dd0dc8f
+1 -1
View File
@@ -91,7 +91,7 @@ if [ -z ${VERSION} ] ; then
# If the VERSION does not match X.Y.Z, retrieve version from the tag
if [[ ! ${VERSION} =~ ([0-9]+)\.([0-9]+)\.([0-9]+) ]] ; then
VERSION=`git -C ${WD} tag --sort=v:refname | grep -E "[0-9]+\.[0-9]+\.[0-9]+" | tail -1 | cut -d'-' -f2`
VERSION=`git -C ${WD} tag --sort=v:refname | grep -E "nuttx-[0-9]+\.[0-9]+\.[0-9]+" | tail -1 | cut -d'-' -f2`
fi
fi