feat: show branch and commit in the Settings > System footer - #53
Merged
Merged
Conversation
…System x4-pro-light-sleep(-debug) had no CROSSINK_VERSION mapping in git_branch.py and fell back to "dev"; map them like x4-pro(-debug). git_branch.py now adds CROSSINK_GIT_BRANCH, CROSSINK_BUILD_NUMBER (CROSSINK_BUILD_NUMBER env, else commit count, empty on shallow clones) and CROSSINK_BUILD_TIME (UTC) through a build middleware scoped to src/util/BuildInfo.cpp, so the per-build timestamp only recompiles that file. The System footer adds a details line under the version and the list reserves room for it; /api/status reports the same fields. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FQ85oMXFSkfR2wF4dx4hLz
The footer showed the full branch, build number and build time, which ran too long on device. It now shows "<short branch> <sha>[*]": batch branches (test/combined-0927-b11) collapse to "b11", other branches drop their prefix folder. /api/status keeps the full branch, number and time. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FQ85oMXFSkfR2wF4dx4hLz
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.
Requested by Clankmaster · project thread
Before: on x4-pro-light-sleep builds, the Settings > System footer said "CrossInk dev" and showed nothing about which build was installed.
After: the footer shows "CrossInk 1.6.0-x4-pro" with a second line such as "b11 27f0ecb", where
*marks a build made from uncommitted changes./api/statusbuild{}also gainsgitBranch,buildNumberandbuildTime.The cause of "dev" was that
scripts/git_branch.pyhad no version mapping forx4-pro-light-sleepandx4-pro-light-sleep-debug. Both are now mapped the same way asx4-proandx4-pro-debug.How:
git_branch.pyaddsCROSSINK_GIT_BRANCH,CROSSINK_GIT_BRANCH_SHORT,CROSSINK_BUILD_NUMBERandCROSSINK_BUILD_TIMEthrough a build middleware that only applies tosrc/util/BuildInfo.cpp, so the timestamp that changes on every build recompiles only that file.test/combined-MMDD-bN) intobN; other branches drop their prefix folder.CROSSINK_BUILD_NUMBERenv var when set, otherwise from the commit count. Shallow clones leave it empty.Size, measured on x4-pro-light-sleep: +436 B flash and +0 RAM compared with development. Tested on-device in batch b11.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FQ85oMXFSkfR2wF4dx4hLz