chore(version): single source of truth — release tag → FIRMWARE_VERSION macro
Audit revealed the Status screen hardcoded "v0.6.0" while v0.6.1 and
v0.6.2 had already shipped — the version string was scattered and
fell behind every release. Centralizing:
- CMakeLists.txt: target_compile_definitions adds
FIRMWARE_VERSION="${VERSION}" so the existing -DVERSION=$tag flag
passed by release.yml propagates into C++ as a compile-time macro.
Local builds without -DVERSION get "dev" — a deliberate "this is
not a release build" tell on the Status header.
- src/oled.cpp render_screen() now renders
"DS5 Bridge " FIRMWARE_VERSION via string-literal concatenation. The
only place a version literal exists in source is now the macro at
the link layer.
- CLAUDE.md gets a "Versioning — single source of truth" section
documenting the release ritual (CHANGELOG bump → tag → push → gh
release create → CI builds + propagates) and naming the
WEB_REPO_DISPATCH_PAT follow-up that's still pending.
Web preview is updated separately to read firmware-latest.json at
runtime — same single source of truth, different distribution path
(the GitHub API).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
ac035fcb25
commit
a7835ac156
+4
-1
@@ -479,7 +479,10 @@ __attribute__((noinline)) void render_screen() {
|
||||
|
||||
const bool connected = bt_is_connected();
|
||||
|
||||
draw_text(kContentX, 0, "DS5 Bridge v0.6.0");
|
||||
// FIRMWARE_VERSION is set via CMake from -DVERSION=... on the build
|
||||
// command line (release.yml passes the tag name). Local builds get
|
||||
// "dev" so a non-tagged build is visible at a glance.
|
||||
draw_text(kContentX, 0, "DS5 Bridge " FIRMWARE_VERSION);
|
||||
draw_icon(120, 0, connected ? kIconLinkOn : kIconLinkOff, 8, 8);
|
||||
|
||||
if (connected) {
|
||||
|
||||
Reference in New Issue
Block a user