Skip to content

Commit

Permalink
added git hash to version string
Browse files Browse the repository at this point in the history
  • Loading branch information
MightyPork committed Aug 6, 2017
1 parent 8a182f0 commit 24a6a0d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ add_definitions(
-DICACHE_RODATA_ATTR=
-DFLAG_GZIP=2
-DADMIN_PASSWORD="asdf"
-DGIT_HASH="blabla"
-DESPFS_HEATSHRINK)

add_executable(esp_vt100_firmware ${SOURCE_FILES})
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ LIBS += esphttpd
# compiler flags using during compilation of source files
CFLAGS = -Os -ggdb -std=gnu99 -Werror -Wpointer-arith -Wundef -Wall -Wl,-EL -fno-inline-functions \
-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
LDFLAGS = -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static
Expand Down Expand Up @@ -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"

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)
$(vecho) "AR $@"
Expand Down
2 changes: 1 addition & 1 deletion html_orig/pages/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<table>
<tr>
<th>ESPTerm</th>
<td>v%vers_fw%, build %date% at %time%</td>
<td>v%vers_fw%, built %date% at %time%</td>
</tr>
<tr>
<th>libesphttpd</th>
Expand Down
2 changes: 1 addition & 1 deletion libesphttpd
2 changes: 1 addition & 1 deletion user/cgi_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ tplAbout(HttpdConnData *connData, char *token, void **arg)
tplSend(connData, __TIME__, -1);
}
else if (streq(token, "vers_httpd")) {
tplSend(connData, HTTPDVER, -1);
tplSend(connData, httpdGetVersion(), -1);
}
else if (streq(token, "vers_sdk")) {
tplSend(connData, STR(ESP_SDK_VERSION), -1);
Expand Down
2 changes: 1 addition & 1 deletion user/user_main.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef 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"

#endif //USER_MAIN_H_H

0 comments on commit 24a6a0d

Please sign in to comment.