mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-09-19 17:46:38 +00:00
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-<commit> otherwise) exported by build-solo-sim.yml, so the live demo no longer falls back to "dev-<compile date>" on tagged releases. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -149,6 +149,15 @@ DEFINES=(
|
||||
-DUI_SENSORS_PAGE=1
|
||||
)
|
||||
|
||||
# The on-device splash's "Solo <version>" bar shows FIRMWARE_VERSION. Without
|
||||
# it, MyMesh.h falls back to "dev-<compile date>" -- what the live demo showed
|
||||
# even for a tagged release. build-solo-sim.yml exports it (tag name for a
|
||||
# release, "dev-<commit>" 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
|
||||
|
||||
Reference in New Issue
Block a user