try to fix CI again

1.2-legacy
Kevin Hester 2020-12-10 13:17:43 +08:00
rodzic 8e2e4f7e6a
commit 99c8df8e7d
1 zmienionych plików z 11 dodań i 5 usunięć

Wyświetl plik

@ -2,14 +2,20 @@
Import("projenv")
import configparser
config = configparser.RawConfigParser()
config.read(projenv["PROJECT_DIR"] + "/version.properties")
version = dict(config.items('VERSION'))
verStr = "{}.{}.{}".format(version["major"], version["minor"], version["build"])
prefsLoc = projenv["PROJECT_DIR"] + "/version.properties"
print(f"Preferences in {prefsLoc}")
try:
config = configparser.RawConfigParser()
config.read(prefsLoc)
version = dict(config.items('VERSION'))
verStr = "{}.{}.{}".format(version["major"], version["minor"], version["build"])
except:
print("Can't read preferences, using 0.0.0")
verStr = "0.0.0"
print(f"Using meshtastic platform-custom.py, firmare version {verStr}")
# General options that are passed to the C and C++ compilers
projenv.Append(CCFLAGS=[
f"-DAPP_VERSION={verStr}"
])
])