tools/version.sh: Add the remaining cut to VERSION

The idea is to have something like EXTRAVERSION. This is useful for
getting RC tags, development tags and for customizing the version. For
example using the tag `nuttx-10.0.0-RC0` the VERSION will be
`10.0.0-RC0`

Signed-off-by: Matheus Castello <matheus@castello.eng.br>
This commit is contained in:
Matheus Castello 2021-03-17 03:35:48 -03:00 committed by Alan Carvalho de Assis
parent 5b813f0c14
commit 85edf0f49d
2 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@
* Pre-processor Definitions
****************************************************************************/
#define SYS_NAMELEN 16
#define SYS_NAMELEN 21
#define VERSION_NAMELEN 41
/****************************************************************************

View File

@ -76,7 +76,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 "nuttx-[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