anki/.buildkite/linux/entrypoint
Damien Elmes 46b80ca773 move node_modules into root folder [action required]
Recommend removing ts/node_modules folder before attempting to
build after this update.

This moves ts/node_modules into the root of the project to work around
https://github.com/ankitects/anki/pull/1405#issuecomment-936213861

Also fixes the sass errors shown when running scripts/svelte-check
2021-10-07 11:42:27 +10:00

30 lines
768 B
Bash
Executable File

#!/bin/bash
set -e
# check author has added themselves to CONTRIBUTORS
echo "--- Checking CONTRIBUTORS"
.buildkite/linux/check_contributors
echo "--- Building"
BAZEL="bazel --output_user_root=/state/bazel --output_base=/state/bazel/anki"
BUILDARGS="--config=ci --experimental_convenience_symlinks=ignore --disk_cache=/state/bazel/disk --repository_cache=/state/bazel/repo"
# move existing node_modules into tree
test -e /state/node_modules && mv /state/node_modules .
$BAZEL build $BUILDARGS ...
echo "+++ Running tests"
$BAZEL test $BUILDARGS ... //rslib:links
echo "--- Building wheels"
$BAZEL build dist
echo "--- Running lints"
python scripts/copyright_headers.py
echo "--- Cleanup"
# if tests succeed, back up node_modules folder
mv node_modules /state/