Update version_branch.yml

This commit is contained in:
2025-12-16 16:43:39 -06:00
parent 25216eac69
commit c441a76c8e

View File

@@ -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)(<version\s*>)([^<]*?)(</version\s*>)")
xml_re = re.compile(r"(?is)(<version\s*>)([^<]*?)(</version\s*>)")
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)