Skip to content

Commit 1d7fd8d

Browse files
committed
fix(): fix issue with the fexcore gha
1 parent e80c2a3 commit 1d7fd8d

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

.github/workflows/update-fexcore.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@ jobs:
3333
3434
# Pick the file with the highest YYMM version.
3535
# Only considers files whose names start with 4 digits (e.g. 2604.wcp, 2508.1.wcp).
36-
LATEST=$(python3 - <<'EOF'
37-
import sys, json, re
38-
39-
data = json.loads(sys.stdin.read())
40-
files = [f["name"] for f in data if f["type"] == "file" and f["name"].endswith(".wcp")]
41-
42-
best = None
43-
best_ver = (-1, -1)
44-
for name in files:
45-
m = re.match(r'^(\d{4})(?:\.(\d+))?\.wcp$', name)
46-
if m:
47-
ver = (int(m.group(1)), int(m.group(2) or 0))
48-
if ver > best_ver:
49-
best_ver = ver
50-
best = name
51-
52-
print(best or "")
53-
EOF
54-
<<< "$RESPONSE")
36+
LATEST=$(echo "$RESPONSE" | python3 - <<'EOF'
37+
import sys, json, re
38+
39+
data = json.loads(sys.stdin.read())
40+
files = [f["name"] for f in data if f["type"] == "file" and f["name"].endswith(".wcp")]
41+
42+
best = None
43+
best_ver = (-1, -1)
44+
for name in files:
45+
m = re.match(r'^(\d{4})(?:\.(\d+))?\.wcp$', name)
46+
if m:
47+
ver = (int(m.group(1)), int(m.group(2) or 0))
48+
if ver > best_ver:
49+
best_ver = ver
50+
best = name
51+
52+
print(best or "")
53+
EOF
54+
)
5555

5656
if [[ -z "$LATEST" ]]; then
5757
echo "Could not determine latest .wcp file." >&2

0 commit comments

Comments
 (0)