From a6cabbafbc3eab2e192ca13f8656e8e73319c5c4 Mon Sep 17 00:00:00 2001 From: Dmitry Rykun Date: Thu, 28 Mar 2024 10:44:58 -0700 Subject: [PATCH] Set HERMES_RELEASE_VERSION correctly Summary: This diff initializes `RELEASE_VERSION` with the value that is provided by the `get_react_native_version` job (it stores its output into `/tmp/react-native-version`). Changelog: [Internal] Differential Revision: D55484988 --- .circleci/configurations/jobs.yml | 4 ++++ .../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, 10 insertions(+) diff --git a/.circleci/configurations/jobs.yml b/.circleci/configurations/jobs.yml index 68fb90a96516c5..cfef7a28f254aa 100644 --- a/.circleci/configurations/jobs.yml +++ b/.circleci/configurations/jobs.yml @@ -813,6 +813,7 @@ jobs: exit 0 fi + export RELEASE_VERSION=$(cat /tmp/react-native-version) if [[ "$SLICE" == "macosx" ]]; then echo "[HERMES] Building Hermes for MacOS" export MAC_DEPLOYMENT_TARGET=10.13 @@ -824,6 +825,7 @@ jobs: BUILD_TYPE="<< parameters.flavor >>" ./utils/build-ios-framework.sh "$SLICE" unset IOS_DEPLOYMENT_TARGET fi + unset RELEASE_VERSION echo "Moving from build_$SLICE to $FINAL_PATH" mv build_"$SLICE" "$FINAL_PATH" @@ -903,7 +905,9 @@ jobs: cd ./packages/react-native/sdks/hermes || exit 1 echo "[HERMES] Creating the universal framework" export IOS_DEPLOYMENT_TARGET=13.4 + export RELEASE_VERSION=$(cat /tmp/react-native-version) ./utils/build-ios-framework.sh build_framework + unset RELEASE_VERSION unset IOS_DEPLOYMENT_TARGET - run: name: Package the Hermes Apple frameworks 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"