From 4600f384dd4142ad8320e9e672748fae5d516aa1 Mon Sep 17 00:00:00 2001 From: kerms Date: Wed, 26 Jun 2024 15:12:40 +0800 Subject: [PATCH] fix(FM_DATE) single quote in the date string --- project_components/wt_system/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/project_components/wt_system/CMakeLists.txt b/project_components/wt_system/CMakeLists.txt index c74f790..be5ddb9 100644 --- a/project_components/wt_system/CMakeLists.txt +++ b/project_components/wt_system/CMakeLists.txt @@ -10,7 +10,7 @@ idf_component_register( # Execute the Git command to get the formatted commit date execute_process( - COMMAND git show -s --format=%cd --date=format:'%Y-%m-%d' + COMMAND git show -s --format=%cd --date=format:%Y-%m-%d WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE FM_DATE RESULT_VARIABLE result @@ -22,5 +22,7 @@ if(NOT "${result}" STREQUAL "0") message(WARNING "Git command failed with: ${git_error}") endif() +message(STATUS FM_DATE:${FM_DATE}) + target_compile_definitions(${COMPONENT_LIB} PRIVATE FW_UPD_DATE="${FM_DATE}") idf_component_set_property(${COMPONENT_NAME} WHOLE_ARCHIVE ON)