From caa84dc9c62950a769f09d6d132f3792d780591f Mon Sep 17 00:00:00 2001 From: lumapu Date: Thu, 11 Aug 2022 09:16:02 +0200 Subject: [PATCH] * fix: compile possible for non repository versions (if project was download as zip) --- tools/esp8266/scripts/auto_firmware_version.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/esp8266/scripts/auto_firmware_version.py b/tools/esp8266/scripts/auto_firmware_version.py index 7992f9df..a4781fbf 100644 --- a/tools/esp8266/scripts/auto_firmware_version.py +++ b/tools/esp8266/scripts/auto_firmware_version.py @@ -16,7 +16,11 @@ if missing_pkgs: from dulwich import porcelain def get_firmware_specifier_build_flag(): - build_version = porcelain.describe('../../') # refers to the repository root dir + try: + build_version = porcelain.describe('../../') # refers to the repository root dir + except: + build_version = "g0000000" + build_flag = "-D AUTO_GIT_HASH=\\\"" + build_version + "\\\"" print ("Firmware Revision: " + build_version) return (build_flag)