Use a custom platformio py file to always set build version

This commit is contained in:
Kevin Hester
2020-12-10 11:28:15 +08:00
parent a0076eb394
commit b1c30f0650
7 changed files with 41 additions and 10 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
set -e
source bin/version.sh
VERSION=`bin/buildinfo.py`
COUNTRIES="US EU433 EU865 CN JP ANZ KR"
#COUNTRIES=US
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env python3
import configparser
config = configparser.RawConfigParser()
config.read('version.properties')
version = dict(config.items('VERSION'))
verStr = "{}.{}.{}".format(version["major"], version["minor"], version["build"])
print(f"{verStr}")
+17
View File
@@ -0,0 +1,17 @@
import configparser
config = configparser.RawConfigParser()
config.read('version.properties')
version = dict(config.items('VERSION'))
verStr = "{}.{}.{}".format(version["major"], version["minor"], version["build"])
print(f"Using meshtastic platform-custom.py, firmare version {verStr}")
Import("env", "projenv")
# General options that are passed to the C and C++ compilers
projenv.Append(CCFLAGS=[
f"-DAPP_VERSION={verStr}"
])
-3
View File
@@ -1,3 +0,0 @@
export VERSION=1.1.9