From c441a76c8e66125cfe688930d7ec5b4217d8898e Mon Sep 17 00:00:00 2001
From: Jonathan Miller <230051081+jmiller-moko@users.noreply.github.com>
Date: Tue, 16 Dec 2025 16:43:39 -0600
Subject: [PATCH] Update version_branch.yml
---
.github/workflows/version_branch.yml | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/version_branch.yml b/.github/workflows/version_branch.yml
index 54dcf68..50ae70a 100644
--- a/.github/workflows/version_branch.yml
+++ b/.github/workflows/version_branch.yml
@@ -123,7 +123,7 @@ jobs:
HIT_VERSION=0
for d in "${TARGET_DIRS[@]}"; do
[[ -d "${d}" ]] || continue
- COUNT=$(grep -RIn --exclude-dir=.git "^[[:space:]]*VERSION[[:space:]]*:" "${d}" | wc -l || true)
+ COUNT=$(grep -RIn --exclude-dir=.git -E "VERSION[[:space:]]*:" "${d}" | wc -l || true)
echo "[INFO] VERSION: hits in ${d}: ${COUNT}"
HIT_VERSION=$((HIT_VERSION + COUNT))
done
@@ -159,8 +159,7 @@ jobs:
root = Path(".").resolve()
targets = [root / "src", root / "docs"]
- header_re = re.compile(r"(?m)^(\s*VERSION\s*:\s*)(\S+)(\s*)$")
- xml_re = re.compile(r"(?is)()([^<]*?)()")
+ 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"}
@@ -205,9 +204,8 @@ jobs:
original = text
- text, n1 = header_re.subn(r"\\1" + new_version + r"\\3", text)
- if n1:
- counters["header_replacements"] += n1
+ text, n1 = header_re.subn(r"\" + new_version, text)
+ += n1
if p.suffix.lower() == ".xml":
text2, n2 = xml_re.subn(r"\\1" + new_version + r"\\3", text)