From 476f197e894bd0ec5109ea072a65350b91ad5dc9 Mon Sep 17 00:00:00 2001 From: Jonathan Miller <230051081+jmiller-moko@users.noreply.github.com> Date: Tue, 23 Dec 2025 15:07:34 -0600 Subject: [PATCH] Update version_branch.yml --- .github/workflows/version_branch.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/version_branch.yml b/.github/workflows/version_branch.yml index 1ac340a..7dce7d9 100644 --- a/.github/workflows/version_branch.yml +++ b/.github/workflows/version_branch.yml @@ -94,8 +94,7 @@ jobs: export PS4='+ ['"${step_name}"':${BASH_SOURCE##*/}:${LINENO}] ' set -x - - trap 'moko_on_err "$step_name" "$LINENO" "$BASH_COMMAND"' ERR + trap "moko_on_err '${step_name}' \"\$LINENO\" \"\$BASH_COMMAND\"" ERR } moko_on_err() { @@ -381,6 +380,7 @@ jobs: echo "[ERROR] No VERSION: (NN.NN.NN) or tags found outside .github" >&2 exit 2 fi + - name: Bump versions and update manifest dates (targeted, excluding .github) run: | source "$CI_HELPERS" @@ -406,6 +406,7 @@ jobs: header_re = re.compile(r'(?im)(VERSION[ ]*:[ ]*)([0-9]{2}[.][0-9]{2}[.][0-9]{2})') manifest_marker_re = re.compile(r'(?is))([^<]*?)()') xml_date_res = [ re.compile(r'(?is)()([^<]*?)()'), re.compile(r'(?is)()([^<]*?)()'), @@ -461,7 +462,8 @@ jobs: counters['header_replacements'] += n1 # Joomla manifest XML only () - if p.suffix.lower() == '.xml' and manifest_marker_re.search(text): + is_manifest = (p.suffix.lower() == '.xml' and manifest_marker_re.search(original) is not None) + if is_manifest: text2, n2 = xml_version_re.subn(lambda m: m.group(1) + new_version + m.group(3), text) text = text2 if n2: @@ -475,13 +477,13 @@ jobs: if text != original: would_update_files.append(str(p)) - if p.suffix.lower() == '.xml' and manifest_marker_re.search(original): + if is_manifest: would_update_manifests.append(str(p)) if not report_only: p.write_text(text, encoding='utf-8') updated_files.append(str(p)) - if p.suffix.lower() == '.xml' and manifest_marker_re.search(original): + if is_manifest: updated_manifests.append(str(p)) report = { @@ -510,7 +512,6 @@ jobs: if not updated_files: print('[INFO] No eligible files updated. Skipping version bump without failure.') raise SystemExit(0) - PY - name: Enforce update feed XML is release generated only (delete update.xml and updates.xml)