From 54a6b4c981f8647cc1fb34a202f199400e946924 Mon Sep 17 00:00:00 2001 From: Dylan Date: Wed, 27 Dec 2023 09:35:08 -0500 Subject: [PATCH 1/3] Fix #79, updating tblCRCTool to use new versioning system. --- cfe_ts_crc.c | 7 ++++++- cfe_ts_crc_version.h | 28 ++++++++++++++++------------ 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/cfe_ts_crc.c b/cfe_ts_crc.c index 02bacc1..ca74689 100644 --- a/cfe_ts_crc.c +++ b/cfe_ts_crc.c @@ -42,6 +42,8 @@ #include "cfe_ts_crc_version.h" +#include "cfe_version.h" + /* These headers are needed for CFE_FS_Header_t and CFE_TBL_File_Hdr_t, respectively. * This uses the OSAL definition of fixed-width types, even thought this tool * is not using OSAL itself. @@ -108,11 +110,14 @@ int main(int argc, char **argv) int fd; char buffer[100]; off_t offsetReturn = 0; + char VersionString[CFE_TS_CRC_CFG_MAX_VERSION_STR_LEN]; /* check for valid input */ if ((argc != 2) || (strncmp(argv[1], "--help", 100) == 0)) { - printf("%s\n", CFE_TS_CRC_VERSION_STRING); + CFE_Config_GetVersionString(VersionString, CFE_TS_CRC_CFG_MAX_VERSION_STR_LEN, "tblCRCTool", + CFE_TS_CRC_VERSION, CFE_TS_CRC_BUILD_CODENAME, CFE_TS_CRC_LAST_OFFICIAL); + printf("%s\n", VersionString); printf("\nUsage: cfe_ts_crc [filename]\n"); exit(EXIT_FAILURE); } diff --git a/cfe_ts_crc_version.h b/cfe_ts_crc_version.h index a5d60f6..c20c156 100644 --- a/cfe_ts_crc_version.h +++ b/cfe_ts_crc_version.h @@ -29,16 +29,22 @@ /* * Development Build Macro Definitions */ -#define CFE_TS_CRC_BUILD_NUMBER 28 /*!< @brief Number of commits since baseline */ -#define CFE_TS_CRC_BUILD_BASELINE \ - "v1.3.0-rc4+dev" /*!< @brief Development Build: git tag that is the base for the current */ +#define CFE_TS_CRC_BUILD_NUMBER 28 /*!< @brief Number of commits since baseline */ +#define CFE_TS_CRC_BUILD_BASELINE "equuleus-rc1" /*!< @brief Development Build: git tag that is the base for the current */ +#define CFE_TS_CRC_BUILD_DEV_CYCLE "equuleus-rc2" /**< @brief Development: Release name for current development cycle */ +#define CFE_TS_CRC_BUILD_CODENAME "Equuleus" /**< @brief: Development: Code name for the current build */ /* * Version Macros, see \ref cfsversions for definitions. */ #define CFE_TS_CRC_MAJOR_VERSION 1 /*!< @brief Major version number */ #define CFE_TS_CRC_MINOR_VERSION 1 /*!< @brief Minor version number */ -#define CFE_TS_CRC_REVISION 99 /*!< @brief Revision version number. Value of 99 indicates a development version.*/ +#define CFE_TS_CRC_REVISION 0 /*!< @brief Revision version number. Value of 0 indicates a development version.*/ + +/** + * @brief Last official release. + */ +#define CFE_TS_CRC_LAST_OFFICIAL "v3.1.0" /*! * @brief Mission revision. @@ -62,14 +68,12 @@ */ #define CFE_TS_CRC_VERSION CFE_TS_CRC_BUILD_BASELINE CFE_TS_CRC_STR(CFE_TS_CRC_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 tblCRCTool version string can be. + * */ -#define CFE_TS_CRC_VERSION_STRING \ - " cFE TS CRC calculator (tblCRCtool) \n" \ - " DEVELOPMENT BUILD \n" \ - " " CFE_TS_CRC_VERSION " \n" \ - " Last Official Release: tblCRCtool v3.1.0" /* For full support please use official release version */ +#define CFE_TS_CRC_CFG_MAX_VERSION_STR_LEN 256 #endif /* CFE_TS_CRC_VERSION_H */ From b73ddf4a24f0d3671cd4664d08f603185ee0c8e5 Mon Sep 17 00:00:00 2001 From: Dylan Date: Wed, 17 Jan 2024 15:36:24 -0500 Subject: [PATCH 2/3] Updating documentation and version numbers for equuleus-rc1+dev2 --- CHANGELOG.md | 6 +++++- cfe_ts_crc_version.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fe9f81..3820e4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog -## Develop,ent Build: v1.3.0-rc4+dev28 +## Development Build: equuleus-rc1+dev2 +- updating tblCRCTool to use new versioning system +- See + +## Development Build: v1.3.0-rc4+dev28 - Replace exit(1) with preferred macro EXIT_FAILURE - See diff --git a/cfe_ts_crc_version.h b/cfe_ts_crc_version.h index c20c156..a247a2e 100644 --- a/cfe_ts_crc_version.h +++ b/cfe_ts_crc_version.h @@ -29,7 +29,7 @@ /* * Development Build Macro Definitions */ -#define CFE_TS_CRC_BUILD_NUMBER 28 /*!< @brief Number of commits since baseline */ +#define CFE_TS_CRC_BUILD_NUMBER 2 /*!< @brief Number of commits since baseline */ #define CFE_TS_CRC_BUILD_BASELINE "equuleus-rc1" /*!< @brief Development Build: git tag that is the base for the current */ #define CFE_TS_CRC_BUILD_DEV_CYCLE "equuleus-rc2" /**< @brief Development: Release name for current development cycle */ #define CFE_TS_CRC_BUILD_CODENAME "Equuleus" /**< @brief: Development: Code name for the current build */ From ebec5272f9d6b8320a2b829819f02fc215f4b04e Mon Sep 17 00:00:00 2001 From: Dylan Date: Wed, 27 Dec 2023 09:35:08 -0500 Subject: [PATCH 3/3] Fix #79, updating tblCRCTool to use new versioning system. --- cfe_ts_crc.c | 7 ++++++- cfe_ts_crc_version.h | 28 ++++++++++++++++------------ 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/cfe_ts_crc.c b/cfe_ts_crc.c index 02bacc1..59c608b 100644 --- a/cfe_ts_crc.c +++ b/cfe_ts_crc.c @@ -108,11 +108,16 @@ int main(int argc, char **argv) int fd; char buffer[100]; off_t offsetReturn = 0; + char VersionString[CFE_TS_CRC_CFG_MAX_VERSION_STR_LEN]; /* check for valid input */ if ((argc != 2) || (strncmp(argv[1], "--help", 100) == 0)) { - printf("%s\n", CFE_TS_CRC_VERSION_STRING); + snprintf(VersionString, CFE_TS_CRC_CFG_MAX_VERSION_STR_LEN, + "%s %s %s (Codename %s), Last Official Release: %s %s)", + "tblCRCTool", CFE_TS_CRC_REVISION == 0 ? "Development Build" : "Release", + CFE_TS_CRC_VERSION, + CFE_TS_CRC_BUILD_CODENAME, "tblCRCTool", CFE_TS_CRC_LAST_OFFICIAL); printf("\nUsage: cfe_ts_crc [filename]\n"); exit(EXIT_FAILURE); } diff --git a/cfe_ts_crc_version.h b/cfe_ts_crc_version.h index a5d60f6..c20c156 100644 --- a/cfe_ts_crc_version.h +++ b/cfe_ts_crc_version.h @@ -29,16 +29,22 @@ /* * Development Build Macro Definitions */ -#define CFE_TS_CRC_BUILD_NUMBER 28 /*!< @brief Number of commits since baseline */ -#define CFE_TS_CRC_BUILD_BASELINE \ - "v1.3.0-rc4+dev" /*!< @brief Development Build: git tag that is the base for the current */ +#define CFE_TS_CRC_BUILD_NUMBER 28 /*!< @brief Number of commits since baseline */ +#define CFE_TS_CRC_BUILD_BASELINE "equuleus-rc1" /*!< @brief Development Build: git tag that is the base for the current */ +#define CFE_TS_CRC_BUILD_DEV_CYCLE "equuleus-rc2" /**< @brief Development: Release name for current development cycle */ +#define CFE_TS_CRC_BUILD_CODENAME "Equuleus" /**< @brief: Development: Code name for the current build */ /* * Version Macros, see \ref cfsversions for definitions. */ #define CFE_TS_CRC_MAJOR_VERSION 1 /*!< @brief Major version number */ #define CFE_TS_CRC_MINOR_VERSION 1 /*!< @brief Minor version number */ -#define CFE_TS_CRC_REVISION 99 /*!< @brief Revision version number. Value of 99 indicates a development version.*/ +#define CFE_TS_CRC_REVISION 0 /*!< @brief Revision version number. Value of 0 indicates a development version.*/ + +/** + * @brief Last official release. + */ +#define CFE_TS_CRC_LAST_OFFICIAL "v3.1.0" /*! * @brief Mission revision. @@ -62,14 +68,12 @@ */ #define CFE_TS_CRC_VERSION CFE_TS_CRC_BUILD_BASELINE CFE_TS_CRC_STR(CFE_TS_CRC_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 tblCRCTool version string can be. + * */ -#define CFE_TS_CRC_VERSION_STRING \ - " cFE TS CRC calculator (tblCRCtool) \n" \ - " DEVELOPMENT BUILD \n" \ - " " CFE_TS_CRC_VERSION " \n" \ - " Last Official Release: tblCRCtool v3.1.0" /* For full support please use official release version */ +#define CFE_TS_CRC_CFG_MAX_VERSION_STR_LEN 256 #endif /* CFE_TS_CRC_VERSION_H */