From 33194ab4de2f3c055e2220ca974c8bf2f00aa3ce Mon Sep 17 00:00:00 2001 From: Jason Huebert Date: Fri, 9 Oct 2026 12:43:31 -0500 Subject: [PATCH] fix: make local-release-build.sh machine-independent - pin LC_ALL=C for the embedded build date: %b is locale-dependent, so a non-English system would bake a different FIRMWARE_BUILD_DATE string (and different artifact bytes) than CI or any other machine - fail fast with a clear message on bash < 4 (mapfile/declare -A/wait -n; macOS ships bash 3.2) - document the remote assumption: the bare-tag form needs a remote named "fork"; the release-URL form works from any clone No other machine- or user-specific bits: paths are $HOME-based, the PlatformIO home is the generic default, and gh targets are passed explicitly. --- scripts/local-release-build.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/local-release-build.sh b/scripts/local-release-build.sh index 531e3420..a8c7014b 100755 --- a/scripts/local-release-build.sh +++ b/scripts/local-release-build.sh @@ -6,6 +6,11 @@ # Usage: # scripts/local-release-build.sh [options] # +# A release URL works from any clone; a bare tag additionally assumes the +# clone has a remote named "fork" pointing at the release's repo (falling +# back to the URL works everywhere). Requires gh (authenticated), git, +# python3, and bash 4+. +# # -j, --jobs N parallel build workers (default: 4) # --targets LIST comma/space/newline-separated target list # (default: every repeater target in the release tree) @@ -104,7 +109,7 @@ if [[ ${1:-} == __worker ]]; then short_sha=${RELEASE_SHA:0:7} # build.sh uses `git rev-parse --short HEAD` firmware_version_string="${FIRMWARE_VERSION}-${short_sha}" - firmware_build_date=$(date '+%d-%b-%Y') + firmware_build_date=$(LC_ALL=C date '+%d-%b-%Y') # %b is locale-dependent; CI runs C.UTF-8 # flags release firmware has always been built with: stack usage metadata # (codegen unchanged, consumed by the stack gate below) + version string @@ -212,6 +217,7 @@ done [[ -n $RELEASE_ARG ]] || { usage; exit 1; } command -v gh >/dev/null || die "gh is required" command -v git >/dev/null || die "git is required" +((BASH_VERSINFO[0] >= 4)) || die "bash 4+ is required (macOS ships 3.2; try 'brew install bash')" SCRIPT_PATH=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}") REPO_ROOT=$(git -C "$(dirname "$SCRIPT_PATH")" rev-parse --show-toplevel)