mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
c557f25648
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/34776 CocoaPods is not used when Hermes is built in Circle CI, so we cannot rely on the React Native CocoaPods scripts to be loaded. The get_hermes_build_type function is removed from the RN CocoaPods scripts and in its place, the ENV['PRODUCTION'] envvar is accessed directly. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D39778190 fbshipit-source-id: 12083b7b4533b4ad7bb7a08612883983a0583616
21 lines
842 B
Ruby
21 lines
842 B
Ruby
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
#
|
|
# This source code is licensed under the MIT license found in the
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
def install_hermes_if_enabled(hermes_enabled, react_native_path)
|
|
unless hermes_enabled
|
|
return
|
|
end
|
|
|
|
prepare_hermes = 'node scripts/hermes/prepare-hermes-for-build'
|
|
react_native_dir = Pod::Config.instance.installation_root.join(react_native_path)
|
|
prep_output, prep_status = Open3.capture2e(prepare_hermes, :chdir => react_native_dir)
|
|
prep_output.split("\n").each { |line| Pod::UI.info line }
|
|
abort unless prep_status == 0
|
|
|
|
pod 'React-hermes', :path => "#{react_native_path}/ReactCommon/hermes"
|
|
pod 'libevent', '~> 2.1.12'
|
|
pod 'hermes-engine', :podspec => "#{react_native_path}/sdks/hermes/hermes-engine.podspec"
|
|
end
|