Skip to content

Commit 42de9c4

Browse files
authored
Merge pull request nasa#81 from nasa/integration-candidate
tblCRCTool Integration candidate: Equuleus-rc1+dev1
2 parents 0d2eda4 + 51a7cb1 commit 42de9c4

3 files changed

Lines changed: 29 additions & 14 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Changelog
22

3-
## Develop,ent Build: v1.3.0-rc4+dev28
3+
## Development Build: equuleus-rc1+dev2
4+
- updating tblCRCTool to use new versioning system
5+
- See <https://github.com/nasa/tblCRCTool/pull/80>
6+
7+
## Development Build: v1.3.0-rc4+dev28
48
- Replace exit(1) with preferred macro EXIT_FAILURE
59
- See <https://github.com/nasa/tblCRCTool/pull/77>
610

cfe_ts_crc.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242

4343
#include "cfe_ts_crc_version.h"
4444

45+
#include "cfe_version.h"
46+
4547
/* These headers are needed for CFE_FS_Header_t and CFE_TBL_File_Hdr_t, respectively.
4648
* This uses the OSAL definition of fixed-width types, even thought this tool
4749
* is not using OSAL itself.
@@ -108,11 +110,16 @@ int main(int argc, char **argv)
108110
int fd;
109111
char buffer[100];
110112
off_t offsetReturn = 0;
113+
char VersionString[CFE_TS_CRC_CFG_MAX_VERSION_STR_LEN];
111114

112115
/* check for valid input */
113116
if ((argc != 2) || (strncmp(argv[1], "--help", 100) == 0))
114117
{
115-
printf("%s\n", CFE_TS_CRC_VERSION_STRING);
118+
snprintf(VersionString, CFE_TS_CRC_CFG_MAX_VERSION_STR_LEN,
119+
"%s %s %s (Codename %s), Last Official Release: %s %s)",
120+
"tblCRCTool", CFE_TS_CRC_REVISION == 0 ? "Development Build" : "Release",
121+
CFE_TS_CRC_VERSION, CFE_TS_CRC_BUILD_CODENAME, "tblCRCTool", CFE_TS_CRC_LAST_OFFICIAL);
122+
printf("%s\n", VersionString);
116123
printf("\nUsage: cfe_ts_crc [filename]\n");
117124
exit(EXIT_FAILURE);
118125
}

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 2 /*!< @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)