From 898eaa6b1d6e784eb6e41db23583df1fc89530ae Mon Sep 17 00:00:00 2001 From: Jonathan Miller <230051081+jmiller-moko@users.noreply.github.com> Date: Tue, 16 Dec 2025 16:45:18 -0600 Subject: [PATCH] Update version_branch.yml --- .github/workflows/version_branch.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/version_branch.yml b/.github/workflows/version_branch.yml index 50ae70a..f8075d7 100644 --- a/.github/workflows/version_branch.yml +++ b/.github/workflows/version_branch.yml @@ -159,7 +159,8 @@ jobs: root = Path(".").resolve() targets = [root / "src", root / "docs"] - xml_re = re.compile(r"(?is)()([^<]*?)()") + header_re = re.compile(r"(?i)(VERSION\s*:\s*)([^\s\n]+)") + xml_re = re.compile(r"(?is)()([^<]*?)()") skip_ext = {".json", ".png", ".jpg", ".jpeg", ".gif", ".svg", ".ico", ".pdf", ".zip", ".7z", ".tar", ".gz", ".woff", ".woff2", ".ttf", ".otf", ".mp3", ".mp4"} skip_dirs = {".git", "node_modules", "vendor", ".venv", "dist", "build"} @@ -204,8 +205,9 @@ jobs: original = text - text, n1 = header_re.subn(r"\" + new_version, text) - += n1 + text, n1 = header_re.subn(r"\1" + new_version, text) + if n1: + counters["header_replacements"] += n1 if p.suffix.lower() == ".xml": text2, n2 = xml_re.subn(r"\\1" + new_version + r"\\3", text)