From 78ff4d0470daffa4a61701f6b640b42309a07823 Mon Sep 17 00:00:00 2001 From: TeTeHacko Date: Mon, 10 Aug 2026 09:56:47 +0200 Subject: [PATCH] fix(build): keep backup/* tags out of the version string Co-Authored-By: Claude Opus 5 (1M context) --- tools/build_version.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/build_version.py b/tools/build_version.py index 6a418a7b..b245b1cd 100644 --- a/tools/build_version.py +++ b/tools/build_version.py @@ -32,10 +32,15 @@ cwd = env.subst("$PROJECT_DIR") # Upstream tags them per-example ("companion-v1.16.0", "repeater-v1.16.0"), so # match anything carrying a v and strip the prefix. Our own release tags # (`...+tth.`) are excluded so they cannot shadow the upstream base. +# So are backup/* tags: `backup/feat-ble-diag-pre-v117-merge` matched *v[0-9]* +# and, being the newest tag, won -- so the T1000-E flashed on 10. 8. 2026 reports +# a base of "v117-merge". A pre-flight safety tag must never end up in the +# version string of the thing it was protecting. base = "nover" try: tag = git(cwd, "describe", "--tags", "--abbrev=0", - "--match", "*v[0-9]*", "--exclude", "*+tth*") + "--match", "*v[0-9]*", "--exclude", "*+tth*", + "--exclude", "backup/*") i = tag.find("v") base = tag[i:] if i >= 0 else tag except Exception: