Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #68 from streamdal/blinktag/fix_init_wasm
Browse files Browse the repository at this point in the history
Fix init_wasm.sh
  • Loading branch information
blinktag authored Feb 7, 2024
2 parents 79535e5 + c603368 commit 3b45665
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion init_wasm.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 3b45665

Please sign in to comment.