Update version_branch.yml

This commit is contained in:
2025-12-23 15:44:02 -06:00
parent 5a13ac146a
commit 93cacf1570

View File

@@ -269,19 +269,17 @@ jobs:
moko_init "Version bump" moko_init "Version bump"
python3 - <<'PY' python3 - <<'PY'
import json import json
import os import os
import re import re
from pathlib import Path from pathlib import Path
from collections import defaultdict from collections import defaultdict
from datetime import datetime, timezone from datetime import datetime, timezone
new_version = (os.environ.get("NEW_VERSION") or "").strip()
new_version = (os.environ.get("NEW_VERSION") or "").strip() if not new_version:
if not new_version: raise SystemExit("[FATAL] NEW_VERSION env var missing")
raise SystemExit("[FATAL] NEW_VERSION env var missing") report_only = (os.environ.get("REPORT_ONLY") or "").strip().lower() == "true"
stamp = datetime.now(timezone.utc).strftime("%Y-%m-%d")
report_only = (os.environ.get("REPORT_ONLY") or "").strip().lower() == "true" root = Path(".").resolve()
stamp = datetime.now(timezone.utc).strftime("%Y-%m-%d") header_re = re.compile(r"(?im)(VERSION[ \t]*:[ \t]*)([0-9]{2}[.][0-9]{2}[.][0-9]{2})")
root = Path(".").resolve()
header_re = re.compile(r"(?im)(VERSION[ \\t]*:[ \\t]*)([0-9]{2}[.][0-9]{2}[.][0-9]{2})")
manifest_marker_re = re.compile(r"(?is)<extension\b") manifest_marker_re = re.compile(r"(?is)<extension\b")