Print logs to differentiate JSC and Hermes builds

Summary:
Print logs during `pod install` to clarify when Hermes is being used with RNTester and/or iOS React Native apps.

This changeset should not result in any change to the behavior of `pod install`, other than adding logs to CocoaPods' stdout.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D35294993

fbshipit-source-id: 55b6115d9f49c311c34ad3cb07346b2f97adcbf9
This commit is contained in:
Héctor Ramos 2022-04-02 00:02:11 -07:00 коммит произвёл Facebook GitHub Bot
Родитель b308f14788
Коммит 72dfc2725c
2 изменённых файлов: 5 добавлений и 6 удалений

Просмотреть файл

@ -14,15 +14,12 @@ if USE_FRAMEWORKS
use_frameworks!
end
if ENV['USE_HERMES'] == '1'
puts "Using Hermes engine"
end
def pods(options = {})
project 'RNTesterPods.xcodeproj'
fabric_enabled = true
puts "Building RNTester with Fabric #{fabric_enabled ? "enabled" : "disabled"}."
hermes_enabled = ENV['USE_HERMES'] == '1'
puts "Building RNTester with Fabric #{fabric_enabled ? "enabled" : "disabled"}.#{hermes_enabled ? " Using Hermes engine." : ""}"
prefix_path = "../.."
@ -34,7 +31,7 @@ def pods(options = {})
use_react_native!(
path: prefix_path,
fabric_enabled: fabric_enabled,
hermes_enabled: ENV['USE_HERMES'] == '1',
hermes_enabled: hermes_enabled,
app_path: "#{Dir.pwd}",
config_file_dir: "#{Dir.pwd}/node_modules",
)

Просмотреть файл

@ -111,9 +111,11 @@ def use_react_native! (options={})
if hermes_enabled
pod 'React-hermes', :path => "#{prefix}/ReactCommon/hermes"
if ENV['BUILD_HERMES_SOURCE'] == '1'
Pod::UI.puts "[Hermes] Building Hermes from source"
hermes_source_path = downloadAndConfigureHermesSource(prefix)
pod 'hermes-engine', :path => "#{hermes_source_path}/hermes-engine.podspec"
else
Pod::UI.warn "[Hermes] Installing Hermes from CocoaPods. The `hermes-engine` pod has been deprecated and will not see future updates."
pod 'hermes-engine', '~> 0.11.0'
end
pod 'libevent', '~> 2.1.12'