From d6c21495f758746aa0eb5c19e70784af706dcb99 Mon Sep 17 00:00:00 2001 From: Dmitry Rykun Date: Fri, 5 Apr 2024 05:08:25 -0700 Subject: [PATCH] Print Hermes build script shell commands only in CI (#43767) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/43767 Print Hermes build script shell commands only in CI. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D55635527 fbshipit-source-id: f0a901e11c523987e97a28b5238dcc08586516dd --- .../sdks/hermes-engine/utils/build-apple-framework.sh | 2 -- .../sdks/hermes-engine/utils/build-ios-framework.sh | 5 ++++- .../sdks/hermes-engine/utils/build-mac-framework.sh | 5 ++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh b/packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh index 6e7b624c56c08f..d3af54bb9cedb9 100755 --- a/packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh +++ b/packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh @@ -7,8 +7,6 @@ # Defines functions for building various Hermes frameworks. # See build-ios-framework.sh and build-mac-framework.sh for usage examples. -set -x -e - CURR_SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)" IMPORT_HERMESC_PATH=${HERMES_OVERRIDE_HERMESC_PATH:-$PWD/build_host_hermesc/ImportHermesc.cmake} diff --git a/packages/react-native/sdks/hermes-engine/utils/build-ios-framework.sh b/packages/react-native/sdks/hermes-engine/utils/build-ios-framework.sh index 960bcddb5e834f..8f598166036ff3 100755 --- a/packages/react-native/sdks/hermes-engine/utils/build-ios-framework.sh +++ b/packages/react-native/sdks/hermes-engine/utils/build-ios-framework.sh @@ -4,7 +4,10 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -set -x -e +if [ "$CI" ]; then + set -x +fi +set -e # Given a specific target, retrieve the right architecture for it # $1 the target you want to build. Allowed values: iphoneos, iphonesimulator, catalyst diff --git a/packages/react-native/sdks/hermes-engine/utils/build-mac-framework.sh b/packages/react-native/sdks/hermes-engine/utils/build-mac-framework.sh index 76d66ffe45b899..5abac8e3604a1d 100755 --- a/packages/react-native/sdks/hermes-engine/utils/build-mac-framework.sh +++ b/packages/react-native/sdks/hermes-engine/utils/build-mac-framework.sh @@ -4,7 +4,10 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -set -x -e +if [ "$CI" ]; then + set -x +fi +set -e # shellcheck source=xplat/js/react-native-github/sdks/hermes-engine/utils/build-apple-framework.sh CURR_SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"