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

[nrf toup] Include EXTRAVERSION in Matter software version string #490

Merged
merged 1 commit into from
Oct 18, 2024
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
2 changes: 1 addition & 1 deletion config/zephyr/ota-image.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function(chip_ota_image TARGET_NAME)
"--version"
${APPVERSION}
"--version-str"
${APP_VERSION_TWEAK_STRING}
${APP_VERSION_EXTENDED_STRING}
"--digest-algorithm"
"sha256"
)
Expand Down
8 changes: 7 additions & 1 deletion config/zephyr/ota-image_sysbuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,14 @@ function(chip_ota_image TARGET_NAME)
set(app_version_patchlevel ${CMAKE_MATCH_1})
string(REGEX MATCH "VERSION_TWEAK = ([0-9]*)" _ ${ver})
set(app_version_tweak ${CMAKE_MATCH_1})
string(REGEX MATCH "EXTRAVERSION = ([a-z0-9]*)" _ ${ver})
set(app_version_extra ${CMAKE_MATCH_1})

set(APP_VERSION_STRING "${app_version_major}.${app_version_minor}.${app_version_patchlevel}+${app_version_tweak}")
if(app_version_extra)
set(APP_VERSION_STRING "${app_version_major}.${app_version_minor}.${app_version_patchlevel}-${app_version_extra}+${app_version_tweak}")
else()
set(APP_VERSION_STRING "${app_version_major}.${app_version_minor}.${app_version_patchlevel}+${app_version_tweak}")
endif()
math(EXPR APPVERSION "(${app_version_major} << 24) | (${app_version_minor} << 16) | (${app_version_patchlevel} << 8) | ${app_version_tweak}" OUTPUT_FORMAT HEXADECIMAL)

set(OTA_ARGS
Expand Down
2 changes: 1 addition & 1 deletion src/platform/nrfconnect/CHIPDevicePlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#ifdef CONFIG_CHIP_DEVICE_SOFTWARE_VERSION_STRING
#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING CONFIG_CHIP_DEVICE_SOFTWARE_VERSION_STRING
#else
#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING APP_VERSION_TWEAK_STRING
#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING APP_VERSION_EXTENDED_STRING
#endif

#define CHIP_DEVICE_CONFIG_TEST_MANUFACTURING_DATE CONFIG_CHIP_DEVICE_MANUFACTURING_DATE
Expand Down
Loading