mirror of
https://github.com/apache/nuttx.git
synced 2026-05-20 04:16:35 +08:00
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:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user