From dafd6c1266cbbef7b9884a414d8cb075da8f0bd8 Mon Sep 17 00:00:00 2001 From: Jakub <106778416+MarekZegare4@users.noreply.github.com> Date: Sat, 19 Sep 2026 14:22:27 +0200 Subject: [PATCH] ci(sim): show the real version in the WASM demo's splash build_wasm.sh now takes FIRMWARE_VERSION (tag name for a release, dev- otherwise) exported by build-solo-sim.yml, so the live demo no longer falls back to "dev-" on tagged releases. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/build-solo-sim.yml | 10 ++++++++++ variants/sim/build_wasm.sh | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/.github/workflows/build-solo-sim.yml b/.github/workflows/build-solo-sim.yml index 72e35275..5c24200c 100644 --- a/.github/workflows/build-solo-sim.yml +++ b/.github/workflows/build-solo-sim.yml @@ -46,7 +46,17 @@ jobs: echo "emsdk 6.0.9 already cached" fi + - name: Resolve build version + run: | + if [ "$GITHUB_REF_TYPE" = "tag" ]; then + echo "BUILD_VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV + else + echo "BUILD_VERSION=dev-$(git rev-parse --short HEAD)" >> $GITHUB_ENV + fi + - name: Build companion WASM + env: + FIRMWARE_VERSION: ${{ env.BUILD_VERSION }} run: variants/sim/build_wasm.sh - name: Build repeater WASM diff --git a/variants/sim/build_wasm.sh b/variants/sim/build_wasm.sh index 73f801fc..8dc436ff 100755 --- a/variants/sim/build_wasm.sh +++ b/variants/sim/build_wasm.sh @@ -149,6 +149,15 @@ DEFINES=( -DUI_SENSORS_PAGE=1 ) +# The on-device splash's "Solo " bar shows FIRMWARE_VERSION. Without +# it, MyMesh.h falls back to "dev-" -- what the live demo showed +# even for a tagged release. build-solo-sim.yml exports it (tag name for a +# release, "dev-" otherwise), same as build-solo-firmwares.yml does +# for the hardware builds; a local build with it unset keeps the old fallback. +if [ -n "${FIRMWARE_VERSION:-}" ]; then + DEFINES+=("-DFIRMWARE_VERSION=\"${FIRMWARE_VERSION}\"") +fi + # -funsigned-char: carried over from Phase 1 verbatim -- real ARM cores # default `char` to unsigned; em++'s target (wasm32) defaults it to signed, # same mismatch Phase 1 hit on a native x86/ARM64 host, for the same reason