From b003e7b4bf51205e5677700a16f425f4b0bda593 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Wed, 1 May 2024 16:27:25 +0700 Subject: [PATCH] chore(common): builder_describe and builder_parse should come first builder_describe and builder_parse should come before other tests, so that (a) scripts can return --help details, and (b) so that builder.inc.sh can tell that the script is a valid builder script, even if environment means that the script will not otherwise run. --- common/linux/build.sh | 10 +++++----- common/mac/build.sh | 10 +++++----- common/windows/build.sh | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/common/linux/build.sh b/common/linux/build.sh index 882318f707..756826cc2d 100755 --- a/common/linux/build.sh +++ b/common/linux/build.sh @@ -5,11 +5,6 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -if [[ $BUILDER_OS != linux ]]; then - builder_echo grey "Platform is not linux; skipping common/linux" - exit 0 -fi - # # TODO: when we have linux-specific tests, add them here # as child modules @@ -23,6 +18,11 @@ builder_describe "Keyman common Linux modules" \ builder_parse "$@" +if [[ $BUILDER_OS != linux ]]; then + builder_echo grey "Platform is not linux; skipping common/linux" + exit 0 +fi + #------------------------------------------------------------------------------------------------------------------- builder_run_child_actions clean configure build test diff --git a/common/mac/build.sh b/common/mac/build.sh index a1c8532fc8..392966d84c 100755 --- a/common/mac/build.sh +++ b/common/mac/build.sh @@ -5,11 +5,6 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -if [[ $BUILDER_OS != mac ]]; then - builder_echo grey "Platform is not macOS; skipping common/mac" - exit 0 -fi - # # TODO: when we have mac-specific tests, add them here # as child modules @@ -23,6 +18,11 @@ builder_describe "Keyman common mac modules" \ builder_parse "$@" +if [[ $BUILDER_OS != mac ]]; then + builder_echo grey "Platform is not macOS; skipping common/mac" + exit 0 +fi + #------------------------------------------------------------------------------------------------------------------- builder_run_child_actions clean configure build test diff --git a/common/windows/build.sh b/common/windows/build.sh index 0245918ec5..714d633544 100755 --- a/common/windows/build.sh +++ b/common/windows/build.sh @@ -5,11 +5,6 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "${THIS_SCRIPT%/*}/../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE -if [[ $BUILDER_OS != windows ]]; then - builder_echo grey "Platform is not Windows; skipping common/windows" - exit 0 -fi - # # TODO: when we have windows-specific tests, add them here # as child modules @@ -23,6 +18,11 @@ builder_describe "Keyman common Windows modules" \ builder_parse "$@" +if [[ $BUILDER_OS != windows ]]; then + builder_echo grey "Platform is not Windows; skipping common/windows" + exit 0 +fi + #------------------------------------------------------------------------------------------------------------------- builder_run_child_actions clean configure build test