mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2026-03-28 18:06:37 +01:00
Config data for tracker page
This commit is contained in:
17
lib/obp60task/utils/auto_version.py
Normal file
17
lib/obp60task/utils/auto_version.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import subprocess
|
||||
|
||||
# Import("env")
|
||||
|
||||
def get_firmware_specifier_build_flag():
|
||||
#ret = subprocess.run(["git", "describe"], stdout=subprocess.PIPE, text=True) #Uses only annotated tags
|
||||
ret = subprocess.run(["git", "describe", "--tags"], stdout=subprocess.PIPE, text=True) #Uses any tags
|
||||
build_version = ret.stdout.strip()
|
||||
build_flag = "-D AUTO_VERSION=\\\"" + build_version + "\\\""
|
||||
print ("Firmware Revision: " + build_version)
|
||||
return (build_flag)
|
||||
|
||||
#env.Append(
|
||||
# BUILD_FLAGS=[get_firmware_specifier_build_flag()]
|
||||
#)
|
||||
|
||||
get_firmware_specifier_build_flag()
|
||||
Reference in New Issue
Block a user