From e02e646a7da6f4b1cc5604cad9cb2152952e79b1 Mon Sep 17 00:00:00 2001 From: rcholic Date: Sun, 21 Dec 2025 19:34:20 -0800 Subject: [PATCH] browser fix tests2 --- .github/workflows/sync-extension.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sync-extension.yml b/.github/workflows/sync-extension.yml index 6691eb4a..18832d4c 100644 --- a/.github/workflows/sync-extension.yml +++ b/.github/workflows/sync-extension.yml @@ -75,11 +75,19 @@ jobs: jq -r '.assets[] | select(.name | endswith(".js") or endswith(".wasm") or endswith(".json") or endswith(".d.ts")) | "\(.browser_download_url)|\(.name)"' | \ while IFS='|' read -r url name; do if [ -n "$url" ] && [ "$url" != "null" ] && [ -n "$name" ]; then - # Handle asset names that might have paths like "pkg/sentience_core.js" + # Handle asset names that might have paths like "pkg/sentience_core.js" or "extension-package/manifest.json" # GitHub releases might preserve directory structure in asset names - # If name starts with "pkg/", we want to preserve that structure - # If name is just a filename, put it at root - if [[ "$name" == pkg/* ]]; then + # Strip "extension-package/" prefix if present, as we'll handle it in copy step + if [[ "$name" == extension-package/* ]]; then + # Asset name is "extension-package/manifest.json" - strip prefix + filename="${name#extension-package/}" + dir=$(dirname "$filename") + if [ "$dir" != "." ]; then + mkdir -p "$dir" + fi + echo " Downloading $name -> $filename" + curl -L -H "Authorization: token ${{ secrets.SENTIENCE_CHROME_TOKEN }}" "$url" -o "$filename" + elif [[ "$name" == pkg/* ]]; then # Asset name is "pkg/sentience_core.js" - create pkg directory mkdir -p pkg filename=$(basename "$name")