CUBB Aerial SDK Versioning in YAML Files#
Starting with Aerial 25-1 release, we are verifying the YAML versioning attribute against the compiled software.
The goal is to ensure that only the YAML files provided with the software release are used, thereby preventing the use of mismatched YAML files and software versions.
We have introduced cubb-utils.cmake under the root cmake/ folder. This file contains a function to read the aerial-sdk-version file located in the root directory. The aerial-sdk-version file includes an internal version string AERIAL_SDK_INTERNAL_VERSION, which is replaced with the actual version during packaging.
YAML files that require versioning will include the following:
aerial_sdk_version: AERIAL_SDK_INTERNAL_VERSION
This placeholder will be replaced during the packaging process.
All C++ code will call the check_yaml_version() function which reads the version from the aerial-sdk-version file and uses it for the -DAERIAL_SDK_VERSION definition.
Once the aerial_sdk_version attribute is read from the YAML file, the function checks the string against the compiled version defined by -DAERIAL_SDK_VERSION. If there is a mismatch, an exception is thrown, resulting in a hard failure. The name of the YAML file is included in the error message.
Users of the software are advised to make changes directly on the newly released YAML vs taking an old YAML files and introducing it to the new Software.