refactor Build Date, GIT_TAG, and GIT_HASH support
Build of FoxMesh / build-and-test (pull_request) Successful in 2m44s
Build of FoxMesh / build-and-test (pull_request) Successful in 2m44s
Dieser Commit ist enthalten in:
1 Ursprung
618ff87d5c
Commit
fb0e096e4e
4 Dateien geändert
+15
-6
Keine Dateien entsprechen Ihrer Suche
@@ -25,6 +25,11 @@ build_flags =
|
|||||||
; -isystem /home/tom/.platformio/packages/framework-espidf/components/esp_libc/platform_include
|
; -isystem /home/tom/.platformio/packages/framework-espidf/components/esp_libc/platform_include
|
||||||
-Wno-include-next
|
-Wno-include-next
|
||||||
; --- STRICT MODE FOR PROJECT APPLICATION CODE ONLY ---
|
; --- STRICT MODE FOR PROJECT APPLICATION CODE ONLY ---
|
||||||
|
|
||||||
|
#-DGIT_HASH=\"\"${sysenv.GIT_HASH}\"\"
|
||||||
|
!echo -DGIT_HASH=\\\"$(git rev-parse --short HEAD)\\\"
|
||||||
|
!echo -DGIT_TAG=\\\"$(git describe --tags --always)\\\"
|
||||||
|
|
||||||
; These flags are strictly applied ONLY to C++ files inside the src/ directory.
|
; These flags are strictly applied ONLY to C++ files inside the src/ directory.
|
||||||
build_src_flags =
|
build_src_flags =
|
||||||
; Enables all standard compiler warning flags
|
; Enables all standard compiler warning flags
|
||||||
|
|||||||
+2
-1
@@ -95,7 +95,8 @@ void process_command(const char* cmd) {
|
|||||||
printf(" test-display - Run a comprehensive visual test suite\r\n");
|
printf(" test-display - Run a comprehensive visual test suite\r\n");
|
||||||
}
|
}
|
||||||
else if (strcmp(cmd, "version") == 0) {
|
else if (strcmp(cmd, "version") == 0) {
|
||||||
printf("%s System - Running Version: %s\r\n", Config::PROJECT_TITLE, Config::PROJECT_VERSION);
|
printf("%s System - Running Version: %s Tag: " GIT_TAG "\r\n", Config::PROJECT_TITLE, Config::PROJECT_VERSION);
|
||||||
|
printf("Build Date: " __DATE__ ", Git-Hash: " GIT_HASH "\r\n");
|
||||||
}
|
}
|
||||||
else if (strcmp(cmd, "status") == 0) {
|
else if (strcmp(cmd, "status") == 0) {
|
||||||
printf("--- %s Status ---\r\n", Config::PROJECT_TITLE);
|
printf("--- %s Status ---\r\n", Config::PROJECT_TITLE);
|
||||||
|
|||||||
+1
-1
@@ -22,7 +22,7 @@
|
|||||||
namespace Config {
|
namespace Config {
|
||||||
// Compile-time constants with strict type enforcement
|
// Compile-time constants with strict type enforcement
|
||||||
constexpr const char* PROJECT_TITLE = "FoxMesh";
|
constexpr const char* PROJECT_TITLE = "FoxMesh";
|
||||||
constexpr const char* PROJECT_VERSION = "1.0.3";
|
constexpr const char* PROJECT_VERSION = "1.0";
|
||||||
constexpr const char* PROJECT_AUTHORS = "Tom OE3TKT";
|
constexpr const char* PROJECT_AUTHORS = "Tom OE3TKT";
|
||||||
|
|
||||||
// CLI Mute Configuration
|
// CLI Mute Configuration
|
||||||
|
|||||||
+7
-4
@@ -8,6 +8,10 @@
|
|||||||
* For the full license terms, see the LICENSE file in the project root.
|
* For the full license terms, see the LICENSE file in the project root.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef GIT_TAG
|
||||||
|
#define GIT_TAG "unknown"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
@@ -127,12 +131,10 @@ extern "C" {
|
|||||||
// Trigger synchronous welcome splash screen frame
|
// Trigger synchronous welcome splash screen frame
|
||||||
if (display != nullptr) {
|
if (display != nullptr) {
|
||||||
char msg[32];
|
char msg[32];
|
||||||
//display->printMessage(0, "FoxMesh " Config::PROJECT_VERSION " \x86" "OE3TKT");
|
snprintf(msg, sizeof(msg), "FoxMesh " GIT_TAG);
|
||||||
snprintf(msg, sizeof(msg), "FoxMesh %s", Config::PROJECT_VERSION);
|
|
||||||
display->printMessage(0, msg);
|
display->printMessage(0, msg);
|
||||||
display->appendMessage(0, "OE3TKT", 15*6);
|
// display->appendMessage(0, GIT_TAG, 12*6);
|
||||||
display->printMessage(1, "----------------------");
|
display->printMessage(1, "----------------------");
|
||||||
//display->printMessage(2, "Bärbel frühstückt ©");
|
|
||||||
}
|
}
|
||||||
// Main system watchdog and status monitor loop
|
// Main system watchdog and status monitor loop
|
||||||
while (true) {
|
while (true) {
|
||||||
@@ -140,6 +142,7 @@ extern "C" {
|
|||||||
Config::PROJECT_TITLE,
|
Config::PROJECT_TITLE,
|
||||||
Config::PROJECT_VERSION,
|
Config::PROJECT_VERSION,
|
||||||
(unsigned long)esp_get_free_heap_size());
|
(unsigned long)esp_get_free_heap_size());
|
||||||
|
// ESP_LOGI(TAG, "Git-Hash: %s", GIT_HASH);
|
||||||
|
|
||||||
vTaskDelay(pdMS_TO_TICKS(5000));
|
vTaskDelay(pdMS_TO_TICKS(5000));
|
||||||
}
|
}
|
||||||
|
|||||||
In neuem Issue referenzieren
Einen Benutzer sperren