Преглед изворни кода

Added version suffix for debug/release

master
Robin Thoni пре 4 година
родитељ
комит
65502e543f
Signed by: 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…
Откажи
Сачувај