main: Fail the build if web dist is not present

This commit is contained in:
johnny9 2023-09-10 00:25:41 -04:00
parent 3cff622c23
commit 0d72fde5ff

View File

@ -30,5 +30,6 @@ set(WEB_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/http_server/axe-os")
if(EXISTS ${WEB_SRC_DIR}/dist/axe-os)
spiffs_create_partition_image(www ${WEB_SRC_DIR}/dist/axe-os FLASH_IN_PROJECT)
else()
message(WARNING "${WEB_SRC_DIR}/dist doesn't exit. Please run 'npm run build' in ${WEB_SRC_DIR}")
message(FATAL_ERROR "${WEB_SRC_DIR}/dist doesn't exit. Please run 'npm i && npm run build' in ${WEB_SRC_DIR}")
endif()