瀏覽代碼

Added version suffix for debug/release

master
Robin Thoni 4 年之前
父節點
當前提交
65502e543f
簽署人: Robin THONI <robin@rthoni.com> GPG Key ID: 4E09DEF46B99E61E
共有 2 個文件被更改,包括 7 次插入2 次删除
  1. 1
    1
      AppCore.cpp
  2. 6
    1
      CMakeLists.txt

+ 1
- 1
AppCore.cpp 查看文件

@@ -54,7 +54,7 @@ BoilerTankMenuActivity g_menuWaterActivity(&g_homeActivity, &g_menuVersionActivi
54 54
 BoilerTankMenuActivity g_menuHeaterActivity(&g_homeActivity, &g_menuWaterActivity, &g_menuVersionActivity, "Chauffage",
55 55
                                             "", &g_appState.tanks[1]);
56 56
 MenuItemActivity g_menuVersionActivity(&g_homeActivity, nullptr, &g_menuHeaterActivity, &g_menuWaterActivity, "Version",
57
-                                       xstr(APP_CORE_VERSION) " - " xstr(APP_CORE_COMMIT));
57
+                                       xstr(APP_CORE_VERSION) " " xstr(APP_CORE_COMMIT));
58 58
 
59 59
 
60 60
 int freeRam()

+ 6
- 1
CMakeLists.txt 查看文件

@@ -23,7 +23,12 @@ set(${CMAKE_PROJECT_NAME}_ALL_SRCS main.ino TempInput.cpp BoilerTankService.cpp
23 23
 set(${CMAKE_PROJECT_NAME}_SKETCH main.ino)
24 24
 generate_arduino_firmware(${CMAKE_PROJECT_NAME})
25 25
 
26
-add_definitions(-DAPP_CORE_VERSION=1.0.0)
26
+if (CMAKE_BUILD_TYPE MATCHES "Debug")
27
+    set(APP_CORE_VERSION_SUFFIX D)
28
+else()
29
+    set(APP_CORE_VERSION_SUFFIX R)
30
+endif()
31
+add_definitions(-DAPP_CORE_VERSION=1.0.0${APP_CORE_VERSION_SUFFIX})
27 32
 
28 33
 execute_process(
29 34
         COMMAND

Loading…
取消
儲存