From 223dd0dc8fcb8e0f533df0eae39bd1a76000acf0 Mon Sep 17 00:00:00 2001 From: kzhioki Date: Sun, 3 Jan 2021 16:37:39 +0900 Subject: [PATCH] tools/version.sh: Fix the version retrieved from git-tag Fix an issue the wrong version could be retrieved from a private tag. --- tools/version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/version.sh b/tools/version.sh index cf7027045ec..e5962325284 100755 --- a/tools/version.sh +++ b/tools/version.sh @@ -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