added git hash to version string

pull/111/merge 0.6.1
Ondřej Hruška 7 years ago
parent 8a182f072d
commit 24a6a0dfd3
  1. 1
      CMakeLists.txt
  2. 5
      Makefile
  3. 2
      html_orig/pages/about.php
  4. 2
      libesphttpd
  5. 2
      user/cgi_main.c
  6. 2
      user/user_main.h

@ -144,6 +144,7 @@ add_definitions(
-DICACHE_RODATA_ATTR= -DICACHE_RODATA_ATTR=
-DFLAG_GZIP=2 -DFLAG_GZIP=2
-DADMIN_PASSWORD="asdf" -DADMIN_PASSWORD="asdf"
-DGIT_HASH="blabla"
-DESPFS_HEATSHRINK) -DESPFS_HEATSHRINK)
add_executable(esp_vt100_firmware ${SOURCE_FILES}) add_executable(esp_vt100_firmware ${SOURCE_FILES})

@ -65,7 +65,8 @@ LIBS += esphttpd
# compiler flags using during compilation of source files # compiler flags using during compilation of source files
CFLAGS = -Os -ggdb -std=gnu99 -Werror -Wpointer-arith -Wundef -Wall -Wl,-EL -fno-inline-functions \ CFLAGS = -Os -ggdb -std=gnu99 -Werror -Wpointer-arith -Wundef -Wall -Wl,-EL -fno-inline-functions \
-nostdlib -mlongcalls -mtext-section-literals -D__ets__ -DICACHE_FLASH \ -nostdlib -mlongcalls -mtext-section-literals -D__ets__ -DICACHE_FLASH \
-Wno-address -Wno-unused -DHTTPD_MAX_BACKLOG_SIZE=4096 -DADMIN_PASSWORD=$(ADMIN_PASSWORD) -Wno-address -Wno-unused -DHTTPD_MAX_BACKLOG_SIZE=4096 -DADMIN_PASSWORD=$(ADMIN_PASSWORD) \
-DGIT_HASH='"$(shell git rev-parse --short HEAD)"'
# linker flags used to generate the main object file # linker flags used to generate the main object file
LDFLAGS = -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static LDFLAGS = -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static
@ -196,7 +197,7 @@ libesphttpd/Makefile:
$(Q) [[ -e "libesphttpd/Makefile" ]] || echo -e "\e[31mlibesphttpd submodule missing.\nIf build fails, run \"git submodule init\" and \"git submodule update\".\e[0m" $(Q) [[ -e "libesphttpd/Makefile" ]] || echo -e "\e[31mlibesphttpd submodule missing.\nIf build fails, run \"git submodule init\" and \"git submodule update\".\e[0m"
libesphttpd: libesphttpd/Makefile libesphttpd: libesphttpd/Makefile
$(Q) make -C libesphttpd USE_OPENSDK=$(USE_OPENSDK) $(Q) make -C libesphttpd USE_OPENSDK=$(USE_OPENSDK) SERVERNAME_PREFIX="ESPTerm "
$(APP_AR): libesphttpd $(OBJ) $(APP_AR): libesphttpd $(OBJ)
$(vecho) "AR $@" $(vecho) "AR $@"

@ -20,7 +20,7 @@
<table> <table>
<tr> <tr>
<th>ESPTerm</th> <th>ESPTerm</th>
<td>v%vers_fw%, build %date% at %time%</td> <td>v%vers_fw%, built %date% at %time%</td>
</tr> </tr>
<tr> <tr>
<th>libesphttpd</th> <th>libesphttpd</th>

@ -1 +1 @@
Subproject commit 61b5a2592842048d7bb3e40b8e8da88e01665d2d Subproject commit b804b196fca6abf28a7e2b5bd482b76b49d518f7

@ -77,7 +77,7 @@ tplAbout(HttpdConnData *connData, char *token, void **arg)
tplSend(connData, __TIME__, -1); tplSend(connData, __TIME__, -1);
} }
else if (streq(token, "vers_httpd")) { else if (streq(token, "vers_httpd")) {
tplSend(connData, HTTPDVER, -1); tplSend(connData, httpdGetVersion(), -1);
} }
else if (streq(token, "vers_sdk")) { else if (streq(token, "vers_sdk")) {
tplSend(connData, STR(ESP_SDK_VERSION), -1); tplSend(connData, STR(ESP_SDK_VERSION), -1);

@ -1,7 +1,7 @@
#ifndef USER_MAIN_H_H #ifndef USER_MAIN_H_H
#define USER_MAIN_H_H #define USER_MAIN_H_H
#define FIRMWARE_VERSION "0.6.0-beta" #define FIRMWARE_VERSION "0.6.1+" GIT_HASH
#define TERMINAL_GITHUB_REPO "https://github.com/MightyPork/esp-vt100-firmware" #define TERMINAL_GITHUB_REPO "https://github.com/MightyPork/esp-vt100-firmware"
#endif //USER_MAIN_H_H #endif //USER_MAIN_H_H

Loading…
Cancel
Save