diff --git a/init_wasm.sh b/init_wasm.sh index 494a6c4..3081e1d 100755 --- a/init_wasm.sh +++ b/init_wasm.sh @@ -1,10 +1,12 @@ #!/bin/bash -e +mkdir -p test-assets/wasm + # Step 1: Curl the GitHub API to get the latest release latest_release=$(curl -s https://api.github.com/repos/streamdal/streamdal/releases) # Step 2: Extract the "browser_download_url" from the JSON response -download_url=$(echo "${latest_release}" | grep -i wasm | grep -o 'https://.*\.zip' | head -n 1) +download_url=$(echo "$latest_release" | grep -o 'https://.*/libs/wasm/.*/release\.zip' | head -1) if [ -z "$download_url" ]; then echo "Error: Unable to find the download URL for the WASM artifact"