Skip to content

Commit ebec527

Browse files
committed
Fix nasa#79, updating tblCRCTool to use new versioning system.
1 parent 0d2eda4 commit ebec527

2 files changed

Lines changed: 22 additions & 13 deletions

File tree

cfe_ts_crc.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,16 @@ int main(int argc, char **argv)
108108
int fd;
109109
char buffer[100];
110110
off_t offsetReturn = 0;
111+
char VersionString[CFE_TS_CRC_CFG_MAX_VERSION_STR_LEN];
111112

112113
/* check for valid input */
113114
if ((argc != 2) || (strncmp(argv[1], "--help", 100) == 0))
114115
{
115-
printf("%s\n", CFE_TS_CRC_VERSION_STRING);
116+
snprintf(VersionString, CFE_TS_CRC_CFG_MAX_VERSION_STR_LEN,
117+
"%s %s %s (Codename %s), Last Official Release: %s %s)",
118+
"tblCRCTool", CFE_TS_CRC_REVISION == 0 ? "Development Build" : "Release",
119+
CFE_TS_CRC_VERSION,
120+
CFE_TS_CRC_BUILD_CODENAME, "tblCRCTool", CFE_TS_CRC_LAST_OFFICIAL);
116121
printf("\nUsage: cfe_ts_crc [filename]\n");
117122
exit(EXIT_FAILURE);
118123
}

cfe_ts_crc_version.h

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,22 @@
2929
/*
3030
* Development Build Macro Definitions
3131
*/
32-
#define CFE_TS_CRC_BUILD_NUMBER 28 /*!< @brief Number of commits since baseline */
33-
#define CFE_TS_CRC_BUILD_BASELINE \
34-
"v1.3.0-rc4+dev" /*!< @brief Development Build: git tag that is the base for the current */
32+
#define CFE_TS_CRC_BUILD_NUMBER 28 /*!< @brief Number of commits since baseline */
33+
#define CFE_TS_CRC_BUILD_BASELINE "equuleus-rc1" /*!< @brief Development Build: git tag that is the base for the current */
34+
#define CFE_TS_CRC_BUILD_DEV_CYCLE "equuleus-rc2" /**< @brief Development: Release name for current development cycle */
35+
#define CFE_TS_CRC_BUILD_CODENAME "Equuleus" /**< @brief: Development: Code name for the current build */
3536

3637
/*
3738
* Version Macros, see \ref cfsversions for definitions.
3839
*/
3940
#define CFE_TS_CRC_MAJOR_VERSION 1 /*!< @brief Major version number */
4041
#define CFE_TS_CRC_MINOR_VERSION 1 /*!< @brief Minor version number */
41-
#define CFE_TS_CRC_REVISION 99 /*!< @brief Revision version number. Value of 99 indicates a development version.*/
42+
#define CFE_TS_CRC_REVISION 0 /*!< @brief Revision version number. Value of 0 indicates a development version.*/
43+
44+
/**
45+
* @brief Last official release.
46+
*/
47+
#define CFE_TS_CRC_LAST_OFFICIAL "v3.1.0"
4248

4349
/*!
4450
* @brief Mission revision.
@@ -62,14 +68,12 @@
6268
*/
6369
#define CFE_TS_CRC_VERSION CFE_TS_CRC_BUILD_BASELINE CFE_TS_CRC_STR(CFE_TS_CRC_BUILD_NUMBER)
6470

65-
/*! @brief Development Build Version String.
66-
* @details Reports the current development build's baseline, number, and name. Also includes a note about the latest
67-
* official version. @n See @ref cfsversions for format differences between development and release versions.
71+
/**
72+
* @brief Max Version String length.
73+
*
74+
* Maximum length that a tblCRCTool version string can be.
75+
*
6876
*/
69-
#define CFE_TS_CRC_VERSION_STRING \
70-
" cFE TS CRC calculator (tblCRCtool) \n" \
71-
" DEVELOPMENT BUILD \n" \
72-
" " CFE_TS_CRC_VERSION " \n" \
73-
" Last Official Release: tblCRCtool v3.1.0" /* For full support please use official release version */
77+
#define CFE_TS_CRC_CFG_MAX_VERSION_STR_LEN 256
7478

7579
#endif /* CFE_TS_CRC_VERSION_H */

0 commit comments

Comments
 (0)