From 09e6796fee10e77cfe85ef47c42957564ddcec5d Mon Sep 17 00:00:00 2001 From: dex2code <90690143+dex2code@users.noreply.github.com> Date: Mon, 11 May 2026 17:28:30 +0300 Subject: [PATCH] Check COMMIT_HASH before retrieving git commit SHA Add check for empty COMMIT_HASH before assignment. --- build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 443bc3db..5c807ef2 100755 --- a/build.sh +++ b/build.sh @@ -152,7 +152,9 @@ build_firmware() { ENV_PLATFORM=($(get_platform_for_env $1)) # get git commit sha - COMMIT_HASH=$(git rev-parse --short HEAD) + if [ -z "$COMMIT_HASH" ]; then + COMMIT_HASH=$(git rev-parse --short HEAD) + fi # set firmware build date FIRMWARE_BUILD_DATE=$(date '+%d-%b-%Y')