feat: OTA server script, release workflow, versioned web flash#55
Merged
feat: OTA server script, release workflow, versioned web flash#55
Conversation
Python script that auto-detects the build firmware, reads version
from claw_config.h, generates version.json with SHA256, and serves
both over HTTP. Prints device configuration instructions.
Usage: make ota-server
scripts/ota-server.py --platform esp32c3 --board xiaozhi-xmini
Signed-off-by: Chao Liu <chao.liu.zevorn@gmail.com>
On tag push (v*), builds all hardware firmware targets, packages each as a zip (for web flashing) and standalone app binary (for OTA), generates OTA version.json with download URLs and SHA256, then creates a GitHub Release with all assets attached. Signed-off-by: Chao Liu <chao.liu.zevorn@gmail.com>
Flash panel now has a Version dropdown that lists: - "latest (main)" — firmware from GitHub Pages (current behavior) - Tagged releases (v0.1.0, v0.2.0, ...) — fetched from GitHub Releases API, downloaded as zip and extracted with JSZip The resolveFirmware() function abstracts firmware resolution: - main: direct fetch from firmware/<platform>-<board>/ - tags: download <target>-firmware.zip from Release, extract via JSZip Signed-off-by: Chao Liu <chao.liu.zevorn@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/ota-server.py: Local OTA development server — auto-detects build firmware, generatesversion.jsonwith SHA256, serves over HTTP with device configuration instructions.github/workflows/release-firmware.yml: CI workflow triggered on tag push (v*) — builds all hardware targets, creates GitHub Release with firmware zips + standalone OTA binaries + version.jsonlatest (main)+ all tagged releases from GitHub Releases API. Tag versions download firmware zip and extract via JSZipUsage
Local OTA development
Creating a release
git tag v0.2.0 git push origin v0.2.0 # CI builds firmware → creates GitHub Release with all assetsWeb flashing with version selection
Users can now pick a specific release version (or
latest) before flashing.Test plan
scripts/ota-server.py --helpworksclaw_config.hworksCloses #53 (Phase 1 complete)