From 3f5aa78af77bb18176e71e2000e0697d46084a38 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Mon, 7 Sep 2026 15:00:06 +0200 Subject: [PATCH] fix: detect debug configuration (local dev) Local site detection is implemented in bootstrap.inc.sh, so this repo never initialized the relevant variables, as it does not use bootstrap itself. Relates-to: keymanapp/keyman#16473 Test-bot: skip --- build.sh | 2 +- init.inc.sh | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 init.inc.sh diff --git a/build.sh b/build.sh index 2caa336..f6f5260 100755 --- a/build.sh +++ b/build.sh @@ -4,7 +4,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/_common/builder.inc.sh" +. "${THIS_SCRIPT%/*}/init.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$THIS_SCRIPT_PATH/sites.inc.sh" diff --git a/init.inc.sh b/init.inc.sh new file mode 100644 index 0000000..d276186 --- /dev/null +++ b/init.inc.sh @@ -0,0 +1,17 @@ +# Initialize the shared-sites builder script; this matches build env detected in +# bootstrap.inc.sh + +# Get the site BUILDER_TIER and use that to determine builder script environment +if [[ ! -z ${KEYMANHOSTS_TIER+x} ]]; then + BUILDER_TIER="${KEYMANHOSTS_TIER}" +elif [[ -f "$(dirname "$THIS_SCRIPT")/tier.txt" ]]; then + BUILDER_TIER=$(cat "$(dirname "$THIS_SCRIPT")/tier.txt") +else + BUILDER_TIER=TIER_DEVELOPMENT +fi + +if [[ "$BUILDER_TIER" == TIER_DEVELOPMENT ]]; then + export KEYMAN_VERSION_ENVIRONMENT=local +fi + +. "${THIS_SCRIPT%/*}/_common/builder.inc.sh"