Skip to content

Commit

Permalink
Fix #139, updating ELF2CFETBL to use new versioning system.
Browse files Browse the repository at this point in the history
  • Loading branch information
dzbaker committed Dec 26, 2023
1 parent 15314d6 commit c58a813
Show file tree
Hide file tree
Showing 2 changed files with 24 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_BUILD_TYPE,
ELF2CFETBL_VERSION, ELF2CFETBL_BUILD_CODENAME, ELF2CFETBL_LAST_OFFICIAL);

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

/**
Expand Down
28 changes: 17 additions & 11 deletions elf2cfetbl_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@
/*
* 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_TYPE "Development Build" /**< @brief: Development: Type of build (Development Build or Release) */
#define ELF2CFETBL_BUILD_CODENAME "Equuleus" /**< @brief: Development: Code name for the current build */

/*
* Version Macros, see \ref cfsversions for definitions.
Expand All @@ -39,14 +41,19 @@
#define ELF2CFETBL_MINOR_VERSION 1 /*!< @brief Minor version number */
#define ELF2CFETBL_REVISION 99 /*!< @brief Revision version number. Value of 99 indicates a development version.*/

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

/*!
* @brief Mission revision.
*
* Reserved for mission use to denote patches/customizations as needed.
* Values 1-254 are reserved for mission use to denote patches/customizations as needed. NOTE: Reserving 0 and 0xFF for
* cFS open-source development use (pending resolution of nasa/cFS#440)
*/
#define ELF2CFETBL_MISSION_REV 0xFF
#define ELF2CFETBL_MISSION_REV 0x00

/*
* Tools to construct version string
Expand All @@ -61,13 +68,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 a sample_lib 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 c58a813

Please sign in to comment.