spiegel-keyman/web/src/engine/paths/build.sh
Eberhard Beilharz 043eb56434
chore(web): Better match directory structure for headless engine tests
This change adds an additional `engine` directory and moves the headless
tests to subdirectories of that. It also renames some test directories.
Together this makes the layout of the tests better match the layout under
`src` and so makes it easier to see what tests what.
2023-12-13 12:11:25 +01:00

41 lines
No EOL
1.3 KiB
Bash
Executable file

#!/usr/bin/env bash
## START STANDARD BUILD SCRIPT INCLUDE
# adjust relative paths as necessary
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
. "${THIS_SCRIPT%/*}/../../../../resources/build/build-utils.sh"
## END STANDARD BUILD SCRIPT INCLUDE
SUBPROJECT_NAME=engine/paths
. "$KEYMAN_ROOT/web/common.inc.sh"
. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh"
# This script runs from its own folder
cd "$THIS_SCRIPT_PATH"
# ################################ Main script ################################
builder_describe "Builds configuration subclasses used by the Keyman Engine for Web (KMW)." \
"@/common/web/es-bundling" \
"@/web/src/engine/osk build" \
"clean" \
"configure" \
"build" \
"test" \
"--ci+ Set to utilize CI-based test configurations & reporting."
# Possible TODO?s
# "upload-symbols Uploads build product to Sentry for error report symbolification. Only defined for $DOC_BUILD_EMBED_WEB" \
builder_describe_outputs \
configure /node_modules \
build /web/build/$SUBPROJECT_NAME/lib/index.mjs
builder_parse "$@"
#### Build action definitions ####
builder_run_action configure verify_npm_setup
builder_run_action clean rm -rf "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}"
builder_run_action build compile "${SUBPROJECT_NAME}"
builder_run_action test test-headless "${SUBPROJECT_NAME}"