From 41e2b8806b916336726fe00afaf95506050d178b Mon Sep 17 00:00:00 2001 From: Dmitry Rykun Date: Thu, 28 Mar 2024 09:13:01 -0700 Subject: [PATCH] Move IOS_DEPLOYMENT_TARGET and MAC_DEPLOYMENT_TARGET to the command body Summary: This diff moves IOS_DEPLOYMENT_TARGET and MAC_DEPLOYMENT_TARGET definitions to the command body. It also adds `set -x` to `build-apple-framework.sh` for simpler diagnostics. Changelog: [Internal] Facebook I don't have strong intention to land it, I just want to trigger CircleCI, and debut the MinimumOSVersion issue. Differential Revision: D55478563 --- .circleci/configurations/jobs.yml | 7 +++++-- .../sdks/hermes-engine/utils/build-apple-framework.sh | 2 ++ .../sdks/hermes-engine/utils/build-ios-framework.sh | 2 ++ .../sdks/hermes-engine/utils/build-mac-framework.sh | 2 ++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.circleci/configurations/jobs.yml b/.circleci/configurations/jobs.yml index f88ce29516d917..e8d8a90161430d 100644 --- a/.circleci/configurations/jobs.yml +++ b/.circleci/configurations/jobs.yml @@ -786,8 +786,6 @@ jobs: - HERMES_WS_DIR: *hermes_workspace_root - HERMES_TARBALL_ARTIFACTS_DIR: *hermes_tarball_artifacts_dir - HERMES_OSXBIN_ARTIFACTS_DIR: *hermes_osxbin_artifacts_dir - - IOS_DEPLOYMENT_TARGET: 13.4 - - MAC_DEPLOYMENT_TARGET: 10.13 steps: - *attach_hermes_workspace - stop_job_if_apple_artifacts_are_there: @@ -808,6 +806,7 @@ jobs: SLICE=<< parameters.slice >> FLAVOR=<< parameters.flavor >> FINAL_PATH=build_"$SLICE"_"$FLAVOR" + # RELEASE_VERSION= echo "Final path for this slice is: $FINAL_PATH" if [[ -d "$FINAL_PATH" ]]; then @@ -817,10 +816,14 @@ jobs: if [[ "$SLICE" == "macosx" ]]; then echo "[HERMES] Building Hermes for MacOS" + export MAC_DEPLOYMENT_TARGET=10.13 BUILD_TYPE="<< parameters.flavor >>" ./utils/build-mac-framework.sh + unset MAC_DEPLOYMENT_TARGET else echo "[HERMES] Building Hermes for iOS: $SLICE" + export IOS_DEPLOYMENT_TARGET=13.4 BUILD_TYPE="<< parameters.flavor >>" ./utils/build-ios-framework.sh "$SLICE" + unset IOS_DEPLOYMENT_TARGET fi echo "Moving from build_$SLICE to $FINAL_PATH" 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 d3af54bb9cedb9..6e7b624c56c08f 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,6 +7,8 @@ # 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 a4026a7a948310..960bcddb5e834f 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,6 +4,8 @@ # 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 + # Given a specific target, retrieve the right architecture for it # $1 the target you want to build. Allowed values: iphoneos, iphonesimulator, catalyst function get_architecture { 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 0492ad28f22eea..76d66ffe45b899 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,6 +4,8 @@ # 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 + # 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)" . "${CURR_SCRIPT_DIR}/build-apple-framework.sh"