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

Fix init_wasm.sh #68

Merged
merged 2 commits into from
Feb 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading