From 2d4849e0d02fce8f49aa99a46c53052b47ee44d6 Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Thu, 10 Dec 2020 14:04:19 +0800 Subject: [PATCH] remote try catch in new build tool - file was missing --- bin/platformio-custom.py | 13 ++++--------- bin/program-release-tbeam.sh | 2 +- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/bin/platformio-custom.py b/bin/platformio-custom.py index bb8a53b5..d56cc09f 100644 --- a/bin/platformio-custom.py +++ b/bin/platformio-custom.py @@ -3,15 +3,10 @@ Import("projenv") import configparser 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" +config = configparser.RawConfigParser() +config.read(prefsLoc) +version = dict(config.items('VERSION')) +verStr = "{}.{}.{}".format(version["major"], version["minor"], version["build"]) print(f"Using meshtastic platform-custom.py, firmare version {verStr}") diff --git a/bin/program-release-tbeam.sh b/bin/program-release-tbeam.sh index d83b3562..03743167 100755 --- a/bin/program-release-tbeam.sh +++ b/bin/program-release-tbeam.sh @@ -1,6 +1,6 @@ set -e -source bin/version.sh +VERSION=`bin/buildinfo.py` esptool.py --baud 921600 write_flash 0x10000 release/latest/bins/firmware-tbeam-US-$VERSION.bin