toos/version.sh: Fix PATCH including extra version

VERSION is also used to get MAJOR, MINOR and PATCH configs. The commit
85edf0f added the remaining of the tag as an extra version and this is
being added erroneously to the PATCH variable. This commit excludes the
extra version from PATCH variable keeping only the number.

Fixes: 85edf0f (tools/version.sh: Add the remaining cut to VERSION)
Signed-off-by: Matheus Castello <matheus@castello.eng.br>
This commit is contained in:
Matheus Castello 2021-03-18 01:54:33 -03:00 committed by Xiang Xiao
parent cbb8a542e5
commit 738034e2eb

View File

@ -112,7 +112,7 @@ if [ "X${MAJOR}.${MINOR}" = "X${VERSION}" ]; then
echo $ADVICE
exit 4
fi
PATCH=`echo ${VERSION} | cut -d'.' -f3`
PATCH=`echo ${VERSION} | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+" | cut -d'.' -f3`
# Get GIT information (if not provided on the command line)