mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-14 12:49:25 +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
77 lines
2.4 KiB
Bash
Executable file
77 lines
2.4 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# Keyman is copyright (C) SIL Global. MIT License.
|
|
#
|
|
# TC build script for Keyman Developer on Windows
|
|
|
|
# shellcheck disable=SC2164
|
|
# shellcheck disable=SC1091
|
|
|
|
## 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
|
|
|
|
# shellcheck disable=SC2154
|
|
. "${KEYMAN_ROOT}/resources/teamcity/includes/tc-helpers.inc.sh"
|
|
|
|
################################ Main script ################################
|
|
|
|
builder_describe \
|
|
"Build Keyman Developer on Windows" \
|
|
"all run all actions (used by TeamCity build configuration)" \
|
|
"build build Keyman Developer and test keyboards" \
|
|
"publish publish debug information files to sentry"
|
|
|
|
builder_parse "$@"
|
|
|
|
if ! builder_is_windows; then
|
|
builder_echo error "This script is intended to be run on Windows only."
|
|
exit 1
|
|
fi
|
|
|
|
# shellcheck disable=SC2154
|
|
cd "${KEYMAN_ROOT}/developer/src"
|
|
|
|
function build_developer_action() {
|
|
_build_developer
|
|
_build_testkeyboards
|
|
}
|
|
|
|
function _build_developer() {
|
|
builder_echo start "build developer" "Building and testing Keyman Developer"
|
|
|
|
./build.sh configure build test
|
|
|
|
builder_echo end "build developer" success "Finished building and testing Keyman Developer"
|
|
}
|
|
|
|
function _build_testkeyboards() {
|
|
builder_echo start "build testkeyboards" "Building test keyboards"
|
|
|
|
"${KEYMAN_ROOT}/common/test/keyboards/build.sh" --zip-source --index
|
|
|
|
builder_echo end "build testkeyboards" success "Finished building test keyboards"
|
|
}
|
|
|
|
function publish_sentry_action() {
|
|
builder_echo start "publish" "Dry-run publish and api"
|
|
./build.sh api publish --dry-run
|
|
builder_echo end "publish" "Dry-run publish and api"
|
|
|
|
builder_echo start "publish sentry" "Publishing debug information files to Sentry"
|
|
# TODO: move this into build.sh publish? re-scope --dry-run into build.sh?
|
|
"${KEYMAN_ROOT}/developer/src/tools/sentry-upload-difs.sh"
|
|
builder_echo end "publish sentry" success "Finished publishing debug information files to Sentry"
|
|
}
|
|
|
|
if builder_has_action all; then
|
|
# TODO: control codesign by KEYMAN_BUILD_LEVEL
|
|
build_developer_action
|
|
if builder_is_ci_build_level_release; then
|
|
publish_sentry_action
|
|
fi
|
|
else
|
|
builder_run_action build build_developer_action
|
|
builder_run_action publish publish_sentry_action
|
|
fi
|