Skip to content

Commit

Permalink
Merge pull request #144 from dzbaker:fix-139
Browse files Browse the repository at this point in the history
Fix #139, updating ELF2CFETBL to use new versioning system.
  • Loading branch information
dzbaker committed Jan 17, 2024
2 parents 15314d6 + 8235341 commit fff5e4b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
8 changes: 7 additions & 1 deletion elf2cfetbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <limits.h>
#include "ELF_Structures.h"
#include "cfe_tbl_filedef.h"
#include "cfe_version.h"
#include "elf2cfetbl_version.h"

#define MAX_SECTION_HDR_NAME_LEN (128)
Expand Down Expand Up @@ -1264,7 +1265,12 @@ int32 ProcessCmdLineOptions(int ArgumentCount, char *Arguments[])

void OutputVersionInfo(void)
{
printf("\n%s\n", ELF2CFETBL_VERSION_STRING);
char VersionString[ELF2CFETBL_CFG_MAX_VERSION_STR_LEN];

CFE_Config_GetVersionString(VersionString, ELF2CFETBL_CFG_MAX_VERSION_STR_LEN, "elf2cfetbl",
ELF2CFETBL_VERSION, ELF2CFETBL_BUILD_CODENAME, ELF2CFETBL_LAST_OFFICIAL);

printf("\n%s\n", VersionString);
}

/**
Expand Down
27 changes: 16 additions & 11 deletions elf2cfetbl_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,22 @@
/*
* Development Build Macro Definitions
*/
#define ELF2CFETBL_BUILD_NUMBER 36 /*!< @brief Number of commits since baseline */
#define ELF2CFETBL_BUILD_BASELINE \
"v3.3.0-rc4" /*!< @brief Development Build: git tag that is the base for the current */
#define ELF2CFETBL_BUILD_NUMBER 36 /*!< @brief Number of commits since baseline */
#define ELF2CFETBL_BUILD_BASELINE "equuleues-rc1" /*!< @brief Development Build: git tag that is the base for the current */
#define ELF2CFETBL_BUILD_DEV_CYCLE "equuleus-rc2" /**< @brief Development: Release name for current development cycle */
#define ELF2CFETBL_BUILD_CODENAME "Equuleus" /**< @brief: Development: Code name for the current build */

/*
* Version Macros, see \ref cfsversions for definitions.
*/
#define ELF2CFETBL_MAJOR_VERSION 3 /*!< @brief Major version number */
#define ELF2CFETBL_MINOR_VERSION 1 /*!< @brief Minor version number */
#define ELF2CFETBL_REVISION 99 /*!< @brief Revision version number. Value of 99 indicates a development version.*/
#define ELF2CFETBL_REVISION 0 /*!< @brief Revision version number. Value of 0 indicates a development version.*/

/**
* @brief Last official release.
*/
#define ELF2CFETBL_LAST_OFFICIAL "v3.1.0"

/*!
* @brief Mission revision.
Expand All @@ -61,13 +67,12 @@
*/
#define ELF2CFETBL_VERSION ELF2CFETBL_BUILD_BASELINE ELF2CFETBL_STR(ELF2CFETBL_BUILD_NUMBER)

/*! @brief Development Build Version String.
* @details Reports the current development build's baseline, number, and name. Also includes a note about the latest
* official version. @n See @ref cfsversions for format differences between development and release versions.
/**
* @brief Max Version String length.
*
* Maximum length that an elf2cfetbl version string can be.
*
*/
#define ELF2CFETBL_VERSION_STRING \
" elf2cfetbl Development Build\n" \
" " ELF2CFETBL_VERSION " (Codename: Draco)\n" /* Codename for current development */ \
" Last Official Release: elf2cfetbl v3.1.0" /* For full support please use official release version */
#define ELF2CFETBL_CFG_MAX_VERSION_STR_LEN 256

#endif /* ELF2CFETBL_VERSION_H */

0 comments on commit fff5e4b

Please sign in to comment.