Fix an issue that the nuttx version is not '10.1.0' but '10.1.0-RC1'
on the master branch. Add a pattern match of "nuttx-" to tags obtained
from git describe.
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>
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>
It's useful when you only have shallow git history handy.
(eg. to save some network bandwidth)
The default value here was chosen to mirror the default of
tools/Makefile.win.
Summary:
- The latest version.sh retrieves version information from git tag
- However, if a repository contains private tags, it will fail
- This commit fixes this issue
Impact:
- version.sh only
Testing:
- Tested with https://github.com/masayuki2009/incubator-nuttx
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>>
1.merge CONFIG_GIT_REVISION_STR into CONFIG_VERSION_BUILD
2.merge gen_getrev.sh into version.sh
3.generate version number if needed
Here is a sample output:
nsh> uname -a
NuttX 8.2 59fd8e12d3-dirty Dec 12 2019 15:48:00 sim sim
nsh> cat /proc/version
NuttX version 8.2 59fd8e12d3-dirty Dec 12 2019 15:48:01