Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #79, updating tblCRCTool to use new versioning system. #80

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cfe_ts_crc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
28 changes: 16 additions & 12 deletions cfe_ts_crc_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 */