diff --git a/common/linux/build.sh b/common/linux/build.sh index 756826cc2d..b52102313e 100755 --- a/common/linux/build.sh +++ b/common/linux/build.sh @@ -18,7 +18,7 @@ builder_describe "Keyman common Linux modules" \ builder_parse "$@" -if [[ $BUILDER_OS != linux ]]; then +if ! builder_is_linux; then builder_echo grey "Platform is not linux; skipping common/linux" exit 0 fi diff --git a/common/mac/build.sh b/common/mac/build.sh index 392966d84c..44a7064c83 100755 --- a/common/mac/build.sh +++ b/common/mac/build.sh @@ -18,7 +18,7 @@ builder_describe "Keyman common mac modules" \ builder_parse "$@" -if [[ $BUILDER_OS != mac ]]; then +if ! builder_is_macos; then builder_echo grey "Platform is not macOS; skipping common/mac" exit 0 fi diff --git a/common/test/resources/test_kill_browserstack.sh b/common/test/resources/test_kill_browserstack.sh index 82e40f85cd..f6ea16a36b 100755 --- a/common/test/resources/test_kill_browserstack.sh +++ b/common/test/resources/test_kill_browserstack.sh @@ -12,7 +12,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ## END STANDARD BUILD SCRIPT INCLUDE -if [[ $BUILDER_OS == win ]]; then +if builder_is_windows; then # BrowserStackLocal may not exist, so always pass taskkill //f //im BrowserStackLocal.exe || true fi diff --git a/common/windows/build.sh b/common/windows/build.sh index 06f5dd0201..663a7f41c7 100755 --- a/common/windows/build.sh +++ b/common/windows/build.sh @@ -18,7 +18,7 @@ builder_describe "Keyman common Windows modules" \ builder_parse "$@" -if [[ $BUILDER_OS != win ]]; then +if ! builder_is_windows; then builder_echo grey "Platform is not Windows; skipping common/windows" exit 0 fi diff --git a/core/commands.inc.sh b/core/commands.inc.sh index 761be3db4d..73ad033a8e 100644 --- a/core/commands.inc.sh +++ b/core/commands.inc.sh @@ -91,7 +91,7 @@ do_test() { if [[ $target =~ ^(x86|x64)$ ]]; then cmd //C build.bat $target $BUILDER_CONFIGURATION test $testparams else - if [[ $target == wasm ]] && [[ $BUILDER_OS == mac ]]; then + if [[ $target == wasm ]] && builder_is_macos; then # 11794 -- parallel tests failing on some mac build agents; temporary # mitigation until we diagnose root cause meson test -j 1 -C "$MESON_PATH" $testparams @@ -136,7 +136,7 @@ do_uninstall() { # ---------------------------------------------------------------------------- build_meson_cross_file_for_wasm() { - if [ $BUILDER_OS == win ]; then + if builder_is_windows; then local R=$(cygpath -w $(echo $EMSCRIPTEN_BASE) | sed 's_\\_\\\\_g') else local R=$(echo $EMSCRIPTEN_BASE | sed 's_/_\\/_g') diff --git a/developer/src/build.sh b/developer/src/build.sh index d01c6caeb8..d81762aa2c 100755 --- a/developer/src/build.sh +++ b/developer/src/build.sh @@ -66,7 +66,7 @@ builder_parse "$@" #------------------------------------------------------------------------------------------------------------------- -if [[ $BUILDER_OS == win ]]; then +if builder_is_windows; then source "$KEYMAN_ROOT/resources/build/win/environment.inc.sh" fi diff --git a/developer/src/kmcmplib/commands.inc.sh b/developer/src/kmcmplib/commands.inc.sh index 280343853c..e2a5679ed6 100644 --- a/developer/src/kmcmplib/commands.inc.sh +++ b/developer/src/kmcmplib/commands.inc.sh @@ -126,7 +126,7 @@ do_command() { # ---------------------------------------------------------------------------- build_meson_cross_file_for_wasm() { - if [ $BUILDER_OS == win ]; then + if builder_is_windows; then local R=$(cygpath -w $(echo $EMSCRIPTEN_BASE) | sed 's_\\_\\\\_g') else local R=$(echo $EMSCRIPTEN_BASE | sed 's_/_\\/_g') @@ -140,4 +140,4 @@ should_do_full_test() { fi return 1 -} \ No newline at end of file +} diff --git a/docs/builder.md b/docs/builder.md index 360a15a550..18272accd0 100644 --- a/docs/builder.md +++ b/docs/builder.md @@ -123,6 +123,13 @@ package.json (`npm run