mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-10-01 01:26:08 -04:00
25 lines
538 B
Bash
Executable File
25 lines
538 B
Bash
Executable File
#!/bin/bash
|
|
set -eo pipefail
|
|
|
|
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
pushd "$SCRIPTDIR" &> /dev/null
|
|
|
|
WASM_PACK_FLAGS="--dev"
|
|
if [[ "$1" == "release" ]]; then
|
|
WASM_PACK_FLAGS="--release"
|
|
fi
|
|
|
|
# Build wasm into an npm package, output into ./pkg
|
|
wasm-pack build $WASM_PACK_FLAGS --target bundler --weak-refs
|
|
|
|
# Install test deps and run test suite
|
|
cd tests
|
|
npm install
|
|
original_tmpdir=$TMPDIR
|
|
mkdir -p ~/tmp
|
|
export TMPDIR=~/tmp
|
|
npm run test:headless
|
|
export TMPDIR=$original_tmpdir
|
|
|
|
popd &> /dev/null
|