From 91b6318a8a4aab3314e43436ec677c39ce7743ed Mon Sep 17 00:00:00 2001 From: lucas lelievre Date: Tue, 4 Nov 2025 01:25:46 +0100 Subject: [PATCH] Make git_commit script use firmware version env for fw tool (#482) Make git_commit script use firmware verion env for fw tool when built from source --- scripts/get_git_commit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/get_git_commit.py b/scripts/get_git_commit.py index d780736..132bcd8 100644 --- a/scripts/get_git_commit.py +++ b/scripts/get_git_commit.py @@ -36,7 +36,10 @@ except Exception: output = f"-DGIT_REV='\"{revision}\"'" -if tag != "": +fwVersion = os.environ.get("FIRMWARE_VERSION") +if fwVersion is not None and fwVersion != "": + output += f" -DFIRMWARE_VERSION='\"{fwVersion}\"'" +elif tag != "": output += f" -DFIRMWARE_VERSION='\"{tag}\"'" elif branch != "": output += f" -DFIRMWARE_VERSION='\"{branch}\"'"