Repository navigation
Stamp firmware with git hash: boot log, /debug page - #23
Merged
Merged
Conversation
No manual version number to forget to bump -- tools/version.py runs as a PlatformIO pre-build hook and embeds the short git commit hash (plus -dirty if the tree has uncommitted changes) as FW_GIT_HASH, shared by all board envs via xiao_base. Falls back to "unknown" outside a git checkout. Surfaced as the first line of the boot log (/log, /debug) and in a new header on the /debug page. Verified end-to-end on a flashed EE02 over Wi-Fi. See docs/versioning.md.
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
-dirtysuffix on uncommitted changes) instead of a hand-maintained version number.tools/version.pyruns as a PlatformIO pre-build hook, injectingFW_GIT_HASHfor all board envs viaxiao_base./log,/debug) and a new header on the/debugpage.docs/versioning.md; README's debug-route table updated.Verification
pio run -e ee02 -e ee03 -e ee04 -e ee05— all build clean.pio test -e native— 79/79 pass (regression check; unaffected logic).git rev-parse --short=8 HEADviastringson the built ELF.curl http://ee02.local/log→open-xiao-epaper: boot #1, wake: power-on, firmware: eb174428-dirtycurl http://ee02.local/debug→ headerEE02 · firmware eb174428-dirty🤖 Generated with Claude Code