From 1d7fd8d118d322fa1cbb01cf951e7e029881910a Mon Sep 17 00:00:00 2001 From: phobos665 Date: Fri, 10 Apr 2026 14:57:31 +0100 Subject: [PATCH] fix(): fix issue with the fexcore gha --- .github/workflows/update-fexcore.yml | 38 ++++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/update-fexcore.yml b/.github/workflows/update-fexcore.yml index 301d3d730b..f10b7c8f3a 100644 --- a/.github/workflows/update-fexcore.yml +++ b/.github/workflows/update-fexcore.yml @@ -33,25 +33,25 @@ jobs: # Pick the file with the highest YYMM version. # Only considers files whose names start with 4 digits (e.g. 2604.wcp, 2508.1.wcp). - LATEST=$(python3 - <<'EOF' - import sys, json, re - - data = json.loads(sys.stdin.read()) - files = [f["name"] for f in data if f["type"] == "file" and f["name"].endswith(".wcp")] - - best = None - best_ver = (-1, -1) - for name in files: - m = re.match(r'^(\d{4})(?:\.(\d+))?\.wcp$', name) - if m: - ver = (int(m.group(1)), int(m.group(2) or 0)) - if ver > best_ver: - best_ver = ver - best = name - - print(best or "") - EOF - <<< "$RESPONSE") + LATEST=$(echo "$RESPONSE" | python3 - <<'EOF' +import sys, json, re + +data = json.loads(sys.stdin.read()) +files = [f["name"] for f in data if f["type"] == "file" and f["name"].endswith(".wcp")] + +best = None +best_ver = (-1, -1) +for name in files: + m = re.match(r'^(\d{4})(?:\.(\d+))?\.wcp$', name) + if m: + ver = (int(m.group(1)), int(m.group(2) or 0)) + if ver > best_ver: + best_ver = ver + best = name + +print(best or "") +EOF +) if [[ -z "$LATEST" ]]; then echo "Could not determine latest .wcp file." >&2