From b348f5ae19e6e0ba4eb10a3e19f398a0940b8cac Mon Sep 17 00:00:00 2001 From: Andreas Stefl Date: Tue, 4 Aug 2026 08:05:05 +0200 Subject: [PATCH] Refuse a two-part version here too, not six minutes in app/build.gradle stopped padding a missing third part, so 'v4.7' is a build error now. This script is the thing that is supposed to catch a bad version before the gradle setup, and it still accepted one to three parts - so the one shape that newly cannot build walked straight past the check and died in the build instead. The v4.7 tag that reached origin on the 3rd and started a release run is what this would have stopped in seconds. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01RsdTta67FZ4KeNfPPw5BVL --- .github/scripts/resolve-version.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/scripts/resolve-version.py b/.github/scripts/resolve-version.py index 5579afef54d7..fd03aff92cc4 100755 --- a/.github/scripts/resolve-version.py +++ b/.github/scripts/resolve-version.py @@ -33,9 +33,11 @@ import re import sys -# what app/build.gradle accepts: an optional v, one to three parts, each below -# 100 so that two digits per part stays unambiguous -VERSION = re.compile(r"^v?[0-9]{1,2}(\.[0-9]{1,2}){0,2}$") +# what app/build.gradle accepts: an optional v, all three parts, each below 100 so +# that two digits per part stays unambiguous. Two-part versions were once padded +# with a zero, which let one build be tagged under two names; the build refuses +# them now, and this has to refuse the same ones or it stops being a check +VERSION = re.compile(r"^v?[0-9]{1,2}(\.[0-9]{1,2}){2}$") def fail(message): @@ -70,7 +72,8 @@ def resolve(tag, given, uploads, log=print): if not VERSION.match(version): raise ValueError( - f"'{version}' is not a version: expected something like v4.8.0, each part below 100" + f"'{version}' is not a version: expected something like v4.8.0 - all " + "three parts, each below 100" ) log(f"building {version}") return version