2020-12-07 12:26:52 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
BAZEL="bazel --output_user_root=~/bazel --output_base=~/bazel/anki"
|
|
|
|
BUILDARGS="--config=ci --experimental_convenience_symlinks=ignore"
|
|
|
|
|
2021-12-09 09:55:19 +01:00
|
|
|
echo "+++ Building and testing"
|
|
|
|
|
2020-12-07 12:26:52 +01:00
|
|
|
# move existing node_modules into tree
|
2021-10-07 03:34:00 +02:00
|
|
|
test -e ~/node_modules && mv ~/node_modules .
|
2020-12-07 12:26:52 +01:00
|
|
|
|
|
|
|
$BAZEL test $BUILDARGS ...
|
|
|
|
|
2020-12-16 02:59:07 +01:00
|
|
|
echo "--- Cleanup"
|
2020-12-07 12:26:52 +01:00
|
|
|
# if tests succeed, back up node_modules folder
|
2021-10-07 03:34:00 +02:00
|
|
|
mv node_modules ~/
|