version: export tweak version in version.h

The commit export TWEAK version to code through version.h.
This aligns the symbols available in code with those available in
CMake and Kconfig.

The new define is available for both KERNEL, APP, and custom version
types (such as MCUBOOT).

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
Torsten Rasmussen 2024-01-26 11:18:09 +01:00 committed by Fabio Baltieri
parent dd33a8152a
commit 738999e191
2 changed files with 3 additions and 0 deletions

View file

@ -91,6 +91,8 @@ following defines are available:
+--------------------+-------------------+------------------------------------------------------+-------------------------+
| APP_PATCHLEVEL | Numerical | ``PATCHLEVEL`` | 3 |
+--------------------+-------------------+------------------------------------------------------+-------------------------+
| APP_VERSION_TWEAK | Numerical | ``VERSION_TWEAK`` | 4 |
+--------------------+-------------------+------------------------------------------------------+-------------------------+
| APP_VERSION_STRING | String (quoted) | ``VERSION_MAJOR``, |br| | "1.2.3-unstable" |
| | | ``VERSION_MINOR``, |br| | |
| | | ``PATCHLEVEL``, |br| | |

View file

@ -14,6 +14,7 @@
#define @VERSION_TYPE@_VERSION_MAJOR @@VERSION_TYPE@_VERSION_MAJOR@
#define @VERSION_TYPE@_VERSION_MINOR @@VERSION_TYPE@_VERSION_MINOR@
#define @VERSION_TYPE@_PATCHLEVEL @@VERSION_TYPE@_PATCHLEVEL@
#define @VERSION_TYPE@_TWEAK @@VERSION_TYPE@_VERSION_TWEAK@
#define @VERSION_TYPE@_VERSION_STRING "@@VERSION_TYPE@_VERSION_STRING@"
#define @BUILD_VERSION_NAME@ @@BUILD_VERSION_NAME@@