Skip to content

Commit

Permalink
Resolve nasa#531, add development build number to version.h
Browse files Browse the repository at this point in the history
Add number and codename
Add macro for version strings
  • Loading branch information
Gerardo E. Cruz-Ortiz committed Jul 14, 2020
1 parent 9eaf83b commit 35e5a86
Showing 1 changed file with 41 additions and 10 deletions.
51 changes: 41 additions & 10 deletions src/os/inc/osapi-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,50 @@
#ifndef _osapi_version_h_
#define _osapi_version_h_

#define OS_MAJOR_VERSION 5 /**< @brief Major version number */
#define OS_MINOR_VERSION 0 /**< @brief Minor version number */
#define OS_REVISION 21 /**< @brief Revision number */
#define OS_MISSION_REV 0 /**< @brief Mission revision */
#define OS_STR_HELPER(x) #x
#define OS_STR(x) OS_STR_HELPER(x)

#define OS_BUILDNUMBER 233 /* Number of commits since baseline */

/* Baseling git tag + Number of commits since baseline */ \
#define OS_VERSION "5.0.0+dev" OS_STR(ELF2CFETBL_BUILDNUMBER)

#define OS_VERSION_STRING "osal development build \n" OS_VERSION
" (Codename: Bootes)" /* Codename for current development */
"\n\nCompiled on " __DATE__ __TIME__
"\n\nLatest Official Version: osal v5.0.0\n" /* For full support please use this version */


/*
* Macro Definitions
* ONLY APPLY for OFFICIAL release builds
*/
#define OS_MAJOR_VERSION 5 /**< @brief Major version number */
#define OS_MINOR_VERSION 0 /**< @brief Minor version number */
#define OS_REVISION 0 /**< @brief Revision number */
#define OS_MISSION_REV 0 /**< @brief Mission revision */

/* #define OS_VERSION \
// OS_STR(OS_MAJOR_VERSION) "." \
// OS_STR(OS_MINOR_VERSION) "." \
// OS_STR(OS_REVISION) "." \
// OS_STR(OS_MISSION_REV)
// #define OS_VERSION_STRING "osal version " OS_VERSION \
// "\n\nCompiled on " __DATE__ ", " __TIME__ "\n"
*/

/*
/**
* Combine the revision components into a single value that application code can check against
* e.g. "#if OSAL_API_VERSION >= 40100" would check if some feature added in OSAL 4.1 is present.
* Combine the revision components into a single value that application code can
check against
* e.g. "#if OSAL_API_VERSION >= 40100" would check if some feature added in
OSAL 4.1 is present.
*/
#define OSAL_API_VERSION ((OS_MAJOR_VERSION * 10000) + (OS_MINOR_VERSION * 100) + OS_REVISION)
#define OSAL_API_VERSION \
((OS_MAJOR_VERSION * 10000) + (OS_MINOR_VERSION * 100) + OS_REVISION)

#endif /* _osapi_version_h_ */

/************************/
/* End of File Comment */
/************************/
/************************/
/* End of File Comment */
/************************/

0 comments on commit 35e5a86

Please sign in to comment.