File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,17 +34,35 @@ macro(Get_DIRTYFLAG APP_DIRTYFLAG)
3434 endif ()
3535endmacro ()
3636
37+ macro (Get_DIRPART APP_PARTCHECK )
38+ find_package (Git QUIET )
39+ if (GIT_FOUND)
40+ execute_process (
41+ COMMAND ./checkpart.sh
42+ OUTPUT_VARIABLE ${APP_PARTCHECK}
43+ OUTPUT_STRIP_TRAILING_WHITESPACE
44+ ERROR_QUIET
45+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
46+ )
47+ endif ()
48+ endmacro ()
49+
3750include ($ENV{IDF_PATH} /tools/cmake/project.cmake )
3851
3952set (APP_COMMITID "" )
4053Get_CommitID (APP_COMMITID )
4154
55+ set (APP_PARTCHECK "" )
56+ Get_DIRPART (APP_PARTCHECK )
57+
4258add_definitions (-DAPP_VERSION= \"${APP_VER_MAJOR} .${APP_VER_MINOR} .${APP_COMMITID} \" )
4359
60+ project(SnapAirUnit)
61+
4462set(APP_DIRTYFLAG "")
4563Get_DIRTYFLAG(APP_DIRTYFLAG)
4664
47- project(SnapAirUnit )
65+ message( STATUS " Code: ${APP_DIRTYFLAG} " )
4866
4967
5068
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # for partitions dir
4+ mkdir -p ./build/storage
5+ mkdir -p ./build/nvs
6+ mkdir -p ./build/phy_init
7+
8+
9+
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- # for partitions dir
4- mkdir -p ./build/storage
5- mkdir -p ./build/nvs
6- mkdir -p ./build/phy_init
7-
83# for git repo dirty control
94rm -f version.h
105if [[ $( git diff --stat) != ' ' ]]; then
You can’t perform that action at this time.
0 commit comments