Browse Source

Added version suffix for debug/release

master
Robin Thoni 2 months ago
parent
commit
65502e543f
Signed by: Robin THONI <robin@rthoni.com> GPG Key ID: 4E09DEF46B99E61E
2 changed files with 7 additions and 2 deletions
  1. 1
    1
      AppCore.cpp
  2. 6
    1
      CMakeLists.txt

+ 1
- 1
AppCore.cpp View File

@@ -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 View File

@@ -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…
Cancel
Save