storj/scripts/test-wasm.sh
Márton Elek 96b88e286e build: fix conditional run of web builds
Jenkins doesn't do a very good job with identifying what has been changed.

While it has a syntax to defined patterns, it compares the current build with the previous build (in case of git-verify it can be a totally different branch) instead of checking the HEAD commit.

This patch introduces shell scripts to do this better:
 * It doesn't depend on Jenkins any more
 * It can be executed locally
 * It can detect web changes properly (see the relation change as an example).

Change-Id: I9d37775e3818c08c4aa96ffb78f84d57f28a2c95
2022-08-11 14:34:44 +00:00

19 lines
393 B
Bash
Executable File

#!/usr/bin/env bash
# Copyright (C) 2022 Storj Labs, Inc.
# See LICENSE for copying information.
set -x
cd "$(dirname "${BASH_SOURCE[0]}")/.."
: ${TAG:=dev}
mkdir -p .build
rm -rf .build/wasm || true
rm -rf release/$TAG/wasm || true
./scripts/build-wasm.sh
cp -r satellite/console/wasm/tests/ .build/
cd .build/tests/
cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" .
npm install
npm run test