From 738034e2ebcc152fe767de82cf79be88e2ac21f7 Mon Sep 17 00:00:00 2001 From: Matheus Castello Date: Thu, 18 Mar 2021 01:54:33 -0300 Subject: [PATCH] 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 --- tools/version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/version.sh b/tools/version.sh index b255edc5d1..f0e5efbaaa 100755 --- a/tools/version.sh +++ b/tools/version.sh @@ -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)