You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
watchtower/scripts/build-tplprev.sh

16 lines
429 B
Bash

#!/bin/bash
# get the repo root directory safely
REPO_ROOT="$(git rev-parse --show-toplevel)"
cd "$REPO_ROOT" || { echo "Error: Failed to change directory"; exit 1; }
cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" ./docs/assets/
# build webassembly binary
GOARCH=wasm GOOS=js go build -o ./docs/assets/tplprev.wasm ./tplprev
if [ $? -ne 0 ]; then
echo "Error: WASM build failed!"
exit 1
fi
echo "WASM build successful!"