Merge remote-tracking branch 'review/observer-firmware' into keymindCascade
# Conflicts: # .github/workflows/build-observer-firmwares.yml # .gitignore # MQTT_IMPLEMENTATION.md # MQTT_INTERNALS.md # README.md # STABILITY_TESTABILITY_HANDOFF.md # docs/cli_commands.md # examples/companion_radio/MyMesh.cpp # examples/simple_repeater/MyMesh.cpp # examples/simple_repeater/UITask.cpp # examples/simple_room_server/MyMesh.cpp # examples/simple_room_server/UITask.cpp # examples/simple_sensor/SensorMesh.cpp # platformio.ini # scripts/generate_webconfig_html.py # scripts/webconfig_mock_server.py # src/helpers/CommonCLI.cpp # src/helpers/CommonCLI.h # src/helpers/JWTHelper.cpp # src/helpers/MQTTDefaults.h # src/helpers/MQTTMessageBuilder.cpp # src/helpers/MQTTPayloadBuilder.h # src/helpers/MQTTPresets.h # src/helpers/bridges/MQTTBridge.h # src/helpers/esp32/WebConfigServer.cpp # src/helpers/esp32/WebConfigServer.h # src/helpers/ui/SH1106Display.cpp # variants/lilygo_tbeam_SX1262/platformio.ini # variants/lilygo_tbeam_SX1276/platformio.ini # variants/lilygo_tlora_v2_1/platformio.ini # variants/thinknode_m7/platformio.ini # webui/index.html
This commit is contained in:
commit
a04a284a3f
74 files changed
+7857
-2483
No files matched your search
@@ -14,16 +14,21 @@ on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- mqtt-bridge-implementation-flex
|
||||
- observer-firmware
|
||||
paths:
|
||||
- '**.md'
|
||||
- 'docs/**'
|
||||
- 'scripts/gen_changelog.py'
|
||||
# /webconfig frames the real portal page against a browser simulator, so
|
||||
# the page itself is a synced doc asset like the .md files above.
|
||||
- 'webui/index.html'
|
||||
|
||||
# Shared with build-observer-firmwares.yml so the two never push to the flasher
|
||||
# repo concurrently (a mixed code+docs commit can trigger both).
|
||||
# Own group: serialize doc syncs against each other only. Deliberately NOT shared
|
||||
# with build-observer-firmwares.yml -- a shared group let one workflow cancel the
|
||||
# other's pending run (a mixed code+docs commit triggers both). Concurrent flasher
|
||||
# pushes are handled by the rebase-retry in "Commit & Push Flasher Content".
|
||||
concurrency:
|
||||
group: flasher-publish
|
||||
group: flasher-docs-sync
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
@@ -57,6 +62,21 @@ jobs:
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Sync the WebConfig Portal Page into Flasher
|
||||
run: |
|
||||
# flasher/webconfig.html embeds the REAL portal page in a device
|
||||
# surround and runs it against lib/webconfig-sim.js, which intercepts
|
||||
# fetch() so no device is needed. Syncing the page is what keeps that
|
||||
# demo honest -- the alternative is screenshots, which go stale without
|
||||
# anyone noticing. The build script only injects a <script> tag; it
|
||||
# refuses a page that already carries the simulator.
|
||||
if [ -f webui/index.html ]; then
|
||||
python3 flasher/scripts/build-webconfig-demo.py webui/index.html
|
||||
echo "rebuilt flasher/webconfig-demo.html from webui/index.html"
|
||||
else
|
||||
echo "WARNING: webui/index.html not found; leaving the demo as-is" >&2
|
||||
fi
|
||||
|
||||
- name: Generate Changelog
|
||||
run: |
|
||||
# Append-only and idempotent; preserves the hand-curated history and
|
||||
@@ -73,4 +93,24 @@ jobs:
|
||||
git config user.name "meshcore-bot"
|
||||
git config user.email "noreply@gessaman.com"
|
||||
git commit -am "Sync docs & changelog from MeshCore ${GITHUB_SHA::7}"
|
||||
git push
|
||||
# build-observer-firmwares.yml can be pushing the same docs/changelog
|
||||
# right now (a mixed code+docs commit triggers both), so a non-fast-forward
|
||||
# is expected rather than fatal: rebase onto its commit and retry. If the
|
||||
# rebase leaves nothing, git reports up-to-date and we exit clean.
|
||||
br=$(git rev-parse --abbrev-ref HEAD)
|
||||
for attempt in 1 2 3; do
|
||||
if git push origin "HEAD:$br"; then
|
||||
exit 0
|
||||
fi
|
||||
echo "push rejected (attempt $attempt); rebasing onto origin/$br"
|
||||
git fetch origin "$br"
|
||||
# --autostash so a dirty tree can never make the rebase refuse to run;
|
||||
# nothing unstaged gets published either way.
|
||||
git rebase --autostash "origin/$br" || {
|
||||
git rebase --abort || true
|
||||
echo "::error::flasher rebase conflicted; re-run this workflow to resync"
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
echo "::error::could not push flasher changes after 3 attempts"
|
||||
exit 1
|
||||
Reference in new issue
Block a user