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

Close #80, Add build number and baseline #86

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
13 changes: 3 additions & 10 deletions fsw/src/sample_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,8 @@ int32 SAMPLE_AppInit( void )

CFE_EVS_SendEvent (SAMPLE_STARTUP_INF_EID,
CFE_EVS_EventType_INFORMATION,
"SAMPLE App Initialized. Version %d.%d.%d.%d",
SAMPLE_APP_MAJOR_VERSION,
SAMPLE_APP_MINOR_VERSION,
SAMPLE_APP_REVISION,
SAMPLE_APP_MISSION_REV);
"SAMPLE App Initialized.%s",
SAMPLE_APP_VERSION_STRING);

return ( CFE_SUCCESS );

Expand Down Expand Up @@ -387,11 +384,7 @@ int32 SAMPLE_Noop( const SAMPLE_Noop_t *Msg )

CFE_EVS_SendEvent(SAMPLE_COMMANDNOP_INF_EID,
CFE_EVS_EventType_INFORMATION,
"SAMPLE: NOOP command Version %d.%d.%d.%d",
SAMPLE_APP_MAJOR_VERSION,
SAMPLE_APP_MINOR_VERSION,
SAMPLE_APP_REVISION,
SAMPLE_APP_MISSION_REV);
"SAMPLE: NOOP command %s", SAMPLE_APP_VERSION);

return CFE_SUCCESS;

Expand Down
53 changes: 38 additions & 15 deletions fsw/src/sample_app_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,49 @@
** See the License for the specific language governing permissions and
** limitations under the License.
**
** File: sample_app_version.h
**
** Purpose:
** The Sample Application header file containing version number
**
** Notes:
**
**
*************************************************************************/
#ifndef _sample_app_version_h_
#define _sample_app_version_h_

/*! @file sample_app_version.h
* @brief Purpose:
*
* The Sample App header file containing version information
*
*/

#ifndef SAMPLE_APP_VERSION_H
#define SAMPLE_APP_VERSION_H

/* Development Build Macro Definitions */

#define SAMPLE_APP_BUILD_NUMBER 64 /*!< Development Build: Number of commits since baseline */
#define SAMPLE_APP_BUILD_BASELINE "v1.1.0" /*!< Development Build: git tag that is the base for the current development */

/* Version Macro Definitions */

#define SAMPLE_APP_MAJOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Major version number. */
#define SAMPLE_APP_MINOR_VERSION 1 /*!< @brief ONLY APPLY for OFFICIAL releases. Minor version number. */
#define SAMPLE_APP_REVISION 0 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. */
#define SAMPLE_APP_MISSION_REV 0 /*!< @brief ONLY USED by MISSION Implementations. Mission revision */

#define SAMPLE_APP_STR_HELPER(x) #x /*!< @brief Helper function to concatenate strings from integer macros */
#define SAMPLE_APP_STR(x) SAMPLE_APP_STR_HELPER(x) /*!< @brief Helper function to concatenate strings from integer macros */

#define SAMPLE_APP_MAJOR_VERSION 1
#define SAMPLE_APP_MINOR_VERSION 1
#define SAMPLE_APP_REVISION 11
#define SAMPLE_APP_MISSION_REV 0
/*! @brief Development Build Version Number.
* @details Baseline git tag + Number of commits since baseline. @n
* See @ref cfsversions for format differences between development and release versions.
*/
#define SAMPLE_APP_VERSION SAMPLE_APP_BUILD_BASELINE "+dev" SAMPLE_APP_STR(SAMPLE_APP_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.
*/
#define SAMPLE_APP_VERSION_STRING \
" Sample App Development Build " \
SAMPLE_APP_VERSION \
", Last Official Release: v1.1.0" /* For full support please use this version */

#endif /* _sample_app_version_h_ */
#endif /* SAMPLE_APP_VERSION_H */

/************************/
/* End of File Comment */
Expand Down