feat(factory): auto-sync latest bins after idf build
This commit is contained in:
@@ -1,3 +1,25 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(TQ_printer)
|
||||
|
||||
# Auto-sync required firmware bins to tools/esptool-factory/bin after IDF build.
|
||||
set(_factory_sync_python "")
|
||||
if(DEFINED PYTHON AND NOT "${PYTHON}" STREQUAL "")
|
||||
set(_factory_sync_python "${PYTHON}")
|
||||
elseif(DEFINED _Python3_EXECUTABLE AND NOT "${_Python3_EXECUTABLE}" STREQUAL "")
|
||||
set(_factory_sync_python "${_Python3_EXECUTABLE}")
|
||||
else()
|
||||
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
||||
set(_factory_sync_python "${Python3_EXECUTABLE}")
|
||||
endif()
|
||||
|
||||
add_custom_target(factory_sync_bins ALL
|
||||
COMMAND ${_factory_sync_python}
|
||||
${CMAKE_SOURCE_DIR}/tools/esptool-factory/sync_factory_bins.py
|
||||
--build-dir
|
||||
${CMAKE_BINARY_DIR}
|
||||
DEPENDS app bootloader
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
COMMENT "Sync firmware bins to tools/esptool-factory/bin"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user