Skip to content

Commit eb1ce77

Browse files
committed
fix(ci): correct <picture> to PNG replacement regex and extend Open VSX verification timeout
The package-vsix.cjs script was replacing <picture> blocks with .png URLs but the actual filenames are banner.png and architecture.png, not banner-light.png or architecture-dark.png. The regex now strips -light/-dark suffixes before applying .png extension. Also increased Open VSX verification from 18 attempts (3 min) to 54 attempts (9 min) to account for slower indexing times.
1 parent 3ad4ebb commit eb1ce77

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,9 @@ jobs:
218218
// Remove mcp SVG icons
219219
readme = readme.replace(/<img src=\"[^\"]*mcp\\.svg\"[^/]*\\/>/g, '');
220220
// Collapse all <picture> blocks to plain <img> — use the light PNG for the marketplace (white bg)
221+
// Strip -light/-dark variant suffix before swapping .svg → .png (only banner.png / architecture.png exist)
221222
readme = readme.replace(/<picture>[\s\S]*?<img src=\"([^\"]+)\"([^/]*)\/>[\s\S]*?<\/picture>/g,
222-
(_, src, attrs) => '<img src=\"' + src.replace(/\.svg$/, '.png') + '\"' + attrs + '/>');
223+
(_, src, attrs) => '<img src=\"' + src.replace(/-(light|dark)\.svg$/, '.png').replace(/\.svg$/, '.png') + '\"' + attrs + '/>');
223224
fs.writeFileSync('packages/extension/README.md', readme);
224225
"
225226
@@ -249,7 +250,7 @@ jobs:
249250
# Verify the version actually landed (Open VSX indexes asynchronously)
250251
VERSION="${{ steps.ext_version.outputs.next }}"
251252
echo "Verifying Open VSX indexed v${VERSION}..."
252-
for i in $(seq 1 18); do
253+
for i in $(seq 1 54); do
253254
FOUND=$(curl -s "https://open-vsx.org/api/Nskha/airtable-formula/${VERSION}" \
254255
| node -e "let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{
255256
try{const p=JSON.parse(d);console.log(p.version||'not-found')}
@@ -259,11 +260,11 @@ jobs:
259260
echo "✓ Open VSX confirmed: v${VERSION}"
260261
break
261262
fi
262-
echo " not indexed yet (attempt $i/18), waiting 10s..."
263+
echo " not indexed yet (attempt $i/54), waiting 10s..."
263264
sleep 10
264265
done
265266
if [[ "$FOUND" != "$VERSION" ]]; then
266-
echo "::error::Open VSX did not index v${VERSION} within 3 minutes — check token and registry status"
267+
echo "::error::Open VSX did not index v${VERSION} within 9 minutes — check token and registry status"
267268
exit 1
268269
fi
269270
env:

0 commit comments

Comments
 (0)