#!/usr/bin/env bash -o errexit -o nounset -o pipefail

mkdir -p artifacts
rm -f artifacts/*.wasm

cd curl_adapter
marine build --release
cp target/wasm32-wasi/release/curl_adapter.wasm ../artifacts/

cd ../drand
marine build --release
cp target/wasm32-wasi/release/drand.wasm ../artifacts/

cd ..