Added git rev to build info
This commit is contained in:
@ -34,6 +34,7 @@ build_flags =
|
|||||||
-D USER_SSID=\""\"" # =\""myssid\""
|
-D USER_SSID=\""\"" # =\""myssid\""
|
||||||
-D USER_SSID_PWD=\""\"" # =\""mypwd\""
|
-D USER_SSID_PWD=\""\"" # =\""mypwd\""
|
||||||
-D CFG_APPVER="\"0.9.0\""
|
-D CFG_APPVER="\"0.9.0\""
|
||||||
|
!python script/git_rev.py
|
||||||
lib_deps = # Switched to forks for better version control.
|
lib_deps = # Switched to forks for better version control.
|
||||||
# Using local copy of these libraries
|
# Using local copy of these libraries
|
||||||
#https://github.com/jrowberg/i2cdevlib.git#<document>
|
#https://github.com/jrowberg/i2cdevlib.git#<document>
|
||||||
|
8
script/git_rev.py
Normal file
8
script/git_rev.py
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import subprocess
|
||||||
|
|
||||||
|
revision = (
|
||||||
|
subprocess.check_output(["git", "rev-parse", "HEAD"])
|
||||||
|
.strip()
|
||||||
|
.decode("utf-8")
|
||||||
|
)
|
||||||
|
print("-D CFG_GITREV='\"%s\"'" % revision)
|
@ -191,7 +191,7 @@ void deepSleep(int t) {
|
|||||||
// Print the build options used
|
// Print the build options used
|
||||||
//
|
//
|
||||||
void printBuildOptions() {
|
void printBuildOptions() {
|
||||||
Log.notice(F("Build options: %s LOGLEVEL %d "
|
Log.notice(F("Build options: %s (%s) LOGLEVEL %d "
|
||||||
#ifdef SKIP_SLEEPMODE
|
#ifdef SKIP_SLEEPMODE
|
||||||
"SKIP_SLEEP "
|
"SKIP_SLEEP "
|
||||||
#endif
|
#endif
|
||||||
@ -205,7 +205,7 @@ void printBuildOptions() {
|
|||||||
"OTA "
|
"OTA "
|
||||||
#endif
|
#endif
|
||||||
CR),
|
CR),
|
||||||
CFG_APPVER, LOG_LEVEL);
|
CFG_APPVER, CFG_GITREV, LOG_LEVEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user