mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-16 19:07:33 +00:00
Clarifies the confusing builder.inc.sh / build-utils.sh distinction by giving the scripts more appropriate names. Most build scripts should use builder-full.inc.sh; some helper scripts can use builder-basic.inc.sh. Documented in resources/build/README.md. Renames: * resources/build/builder.inc.sh to resources/build/builder-full.inc.sh * resources/build/build-utils.sh to resources/build/builder-basic.inc.sh Other changes: * Moves Android-specific functions out of builder-basic.inc.sh and into android/build.sh. * Renames functions in builder-basic.inc.sh More functions may be moved from builder-basic.inc.sh into utils.inc.sh or other scripts in the future. Fixes: #14065 Build-bot: build all Test-bot: skip
59 lines
2.1 KiB
Bash
Executable file
59 lines
2.1 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
#
|
|
# Compile keymanweb predictive-text components.
|
|
|
|
## START STANDARD BUILD SCRIPT INCLUDE
|
|
# adjust relative paths as necessary
|
|
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
|
. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh"
|
|
## END STANDARD BUILD SCRIPT INCLUDE
|
|
|
|
. "$KEYMAN_ROOT/resources/build/utils.inc.sh"
|
|
|
|
# ################################ Main script ################################
|
|
|
|
builder_describe "Builds predictive-text components used within Keyman Engine for Web (KMW)." \
|
|
"clean" \
|
|
"configure" \
|
|
"build" \
|
|
"test" \
|
|
":templates Builds the model templates utilized by compiled lexical models" \
|
|
":wordbreakers Builds the wordbreakers provided for lexical model use" \
|
|
":worker-main Builds the predictive-text worker interface module" \
|
|
":worker-thread Builds the predictive-text worker" \
|
|
":_all (Meta build target used when targets are not specified)"
|
|
|
|
# Possible TODO?
|
|
# "upload-symbols Uploads build product to Sentry for error report symbolification. Only defined for $DOC_BUILD_EMBED_WEB" \
|
|
|
|
builder_parse "$@"
|
|
|
|
config=release
|
|
if builder_is_debug_build; then
|
|
config=debug
|
|
fi
|
|
|
|
builder_describe_outputs \
|
|
configure "/node_modules" \
|
|
build:templates "/web/src/engine/predictive-text/build/obj/index.js" \
|
|
build:wordbreakers "/web/src/engine/wordbreakers/build/main/obj/index.js" \
|
|
build:worker-main "/web/src/engine/worker-main/build/obj/lmlayer.js" \
|
|
build:worker-thread "/web/src/engine/worker-thread/build/obj/worker-main.wrapped.js"
|
|
|
|
BUNDLE_CMD="node ${KEYMAN_ROOT}/web/src/tools/es-bundling/build/common-bundle.mjs"
|
|
|
|
#### Build action definitions ####
|
|
|
|
# We can run all clean & configure actions at once without much issue.
|
|
|
|
builder_run_child_actions clean
|
|
builder_run_child_actions configure
|
|
|
|
## Build actions
|
|
|
|
builder_run_child_actions build:wordbreakers
|
|
builder_run_child_actions build:templates
|
|
builder_run_child_actions build:worker-thread
|
|
builder_run_child_actions build:worker-main
|
|
|
|
builder_run_child_actions test
|