From 790d836402d1b3b0588607d6ca8aa18943bb2047 Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" Date: Sat, 25 Jul 2020 15:18:51 -0400 Subject: [PATCH] HOTFIX: IC-20200624 Move version documentation to doxygen file Moved documentation and version code template from cfe_version.h to cfs_versions.dox --- cmake/cfe-common.doxyfile.in | 1 + docs/src/cfs_versions.dox | 94 +++++++++++++++++ docs/src/main.dox | 2 +- fsw/cfe-core/src/inc/cfe_version.h | 162 ++++++----------------------- 4 files changed, 126 insertions(+), 133 deletions(-) create mode 100644 docs/src/cfs_versions.dox diff --git a/cmake/cfe-common.doxyfile.in b/cmake/cfe-common.doxyfile.in index c06c38697..0fe72ca2f 100644 --- a/cmake/cfe-common.doxyfile.in +++ b/cmake/cfe-common.doxyfile.in @@ -60,6 +60,7 @@ STRIP_FROM_PATH = @MISSION_SOURCE_DIR@ # This is applicable to both users guide and detail design outputs IMAGE_PATH += @MISSION_SOURCE_DIR@/cfe/docs/src INPUT += @MISSION_SOURCE_DIR@/cfe/docs/src/cfe_glossary.dox +INPUT += @MISSION_SOURCE_DIR@/cfe/docs/src/cfs_versions.dox INPUT += @MISSION_SOURCE_DIR@/cfe/docs/src/cfe_api.dox INPUT += @MISSION_SOURCE_DIR@/cfe/docs/src/cfe_es.dox INPUT += @MISSION_SOURCE_DIR@/cfe/docs/src/cfe_evs.dox diff --git a/docs/src/cfs_versions.dox b/docs/src/cfs_versions.dox new file mode 100644 index 000000000..60ae51019 --- /dev/null +++ b/docs/src/cfs_versions.dox @@ -0,0 +1,94 @@ +/** + \page cfsversions Version Numbers + +

Version Number Semantics

+ + The version number is a sequence of four numbers, generally separated by dots when written. These are, in order, + the Major number, the Minor number, the Revision number, and the Mission Revision number. Missions may modify the Mission Revision information as needed to suit their needs. + + It is important to note that Major, Minor, and Revision numbers are only updated upon official releases of tagged + versions, \b NOT on development builds. We aim to follow the Semantic Versioning v2.0 specification with our versioning. + + The MAJOR number shall be incremented on release to indicate when there is a change to an API + that may cause existing, correctly-written cFS components to stop working. It may also be incremented for a + release that contains changes deemed to be of similar impact, even if there are no actual changes to the API. + + The MINOR number shall be incremented on release to indicate the addition of features to the API + which do not break the existing code. It may also be incremented for a release that contains changes deemed + to be of similar impact, even if there are no actual updates to the API. + + The REVISION number shall be incremented on changes that benefit from unique identification such as bug fixes or major documentation updates. The Revision number may also be updated if there are other changes contained within a release that make it desirable for applications to distinguish one release from another. + + The Major, Minor, and Revision numbers are provided in this header file as part of the API + definition; this macro must expand to a simple integer value, so that it can be used in simple if directives by the macro preprocessor. + + The Mission Version number shall be set to zero in all officially released packages, and is entirely reserved for the use of the mission. The Mission Version is provided as a simple macro defined in the cfe_platform_cfg.h header file. + +

Version Number Flexibility

+ + The major number may increment when there is no breaking change to the API, if the changes are significant enough to + warrant the same level of attention as a breaking API change. + + The minor number may increment when there have been no augmentations to the API, if changes are as significant as + additions to the public API. + + The revision numbers may increment in implementations where no actual implementation-specific code has changed, if + there are other changes within the release with similar significance. + +

How and Where Defined

+ + The Major, Minor, and Revision components of the version are provided as simple macros defined in the cfe_version.h header file as part of the API definition; these macros must expand to simple integer values, so that they can be used in simple if directives by the macro preprocessor. + + The Mission Version is provided as a simple macro defined in the cfe_platform_cfg.h header file. As delivered in official releases, these macros must expand to simple integer values, so that they can be used in simple macro preprocessor conditions, but delivered code should not prevent a mission from, for example, deciding that the Mission Version is actually a text string. + +

Identification of development builds

+ + In order to distinguish between development versions, we also provide a BUILDNUMBER. + + The BUILD_NUMBER reflects the number of commits since the BUILD_BASELINE, a baseline git tag, for each particular + component. The BUILD_NUMBER integer increases monotonically for a given development cycle. The BUILD_BASELINE identifies the current development cycle and is a git tag with format vX.Y.Z. The Codename used in the version string also refers to the current development cycle. When a new baseline tag and codename are created, the the BUILD_NUMBER resets to zero and begins increasing + from a new baseline. + +

Templates for the version and version string

+ + The following templates are the code to be used in cfe_version.h for either official releases or development builds. The apps and repositories follow the same pattern by replacing the CFE_ prefix with the appropriate name; for example, osal uses OS_, psp uses CFE_PSP_IMPL, and so on. + +

Template for Official Releases

+ + \verbatim + + /* Template for Development Builds + + \verbatim + + /*! @brief Development Build Version Number. + * Baseline git tag + Number of commits since baseline. @n + * See cfs_versions.dox for format differences between development and release versions. + */ + #define CFE_VERSION \ + CFE_BUILD_BASELINE CFE_STR(CFE_BUILD_NUMBER) + + /*! @brief Development Build Version String. + * Reports the current development build's baseline, number, and name. Also includes a note about the latest official version. @n + * See cfs_versions.dox for format differences between development and release versions. + */ + #define CFE_VERSION_STRING \ + " cFE Development Build\n " \ + CFE_VERSION " (Codename: CONSTELLATION_NAME)" /* Codename for current development */ \ + "\n Last Offical Release: cfe vX.Y.Z" /* For full support please use this version */ + + \endverbatim + +**/ diff --git a/docs/src/main.dox b/docs/src/main.dox index 068aac3cc..d606c38db 100644 --- a/docs/src/main.dox +++ b/docs/src/main.dox @@ -6,7 +6,7 @@