From d1d8fdf4cab39d4197883d354db0e84fd9d672fd Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Wed, 3 May 2023 09:14:40 -0700 Subject: [PATCH] Pass the hermestag file to the `read` function (#37231) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/37231 In a previous diff, we tried to disambiguate between versions of hermes engine by reading the hermestag file. However, we forgot to pass the file to the `read` function. It used to work both on main and on CI because that file doesn't exists in those environments. But it failed as soon as we tried to test a release. ## Changelog: [iOS][Fixed] - Pass the hermestag file to the `read` function. Reviewed By: dmytrorykun Differential Revision: D45530010 fbshipit-source-id: 2dcdb77adad375d2e28dd4230ab05dbb85fb82e5 --- packages/react-native/scripts/cocoapods/jsengine.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/scripts/cocoapods/jsengine.rb b/packages/react-native/scripts/cocoapods/jsengine.rb index e8d93495488..e4b2dd4e315 100644 --- a/packages/react-native/scripts/cocoapods/jsengine.rb +++ b/packages/react-native/scripts/cocoapods/jsengine.rb @@ -33,7 +33,7 @@ def setup_hermes!(react_native_path: "../node_modules/react-native", fabric_enab # This `:tag => hermestag` below is only to tell CocoaPods to update hermes-engine when React Native version changes. # We have custom logic to compute the source for hermes-engine. See sdks/hermes-engine/* hermestag_file = File.join(react_native_path, "sdks", ".hermesversion") - hermestag = File.exist?(hermestag_file) ? File.read().strip : '' + hermestag = File.exist?(hermestag_file) ? File.read(hermestag_file).strip : '' pod 'hermes-engine', :podspec => "#{react_native_path}/sdks/hermes-engine/hermes-engine.podspec", :tag => hermestag pod 'React-hermes', :path => "#{react_native_path}/ReactCommon/hermes" pod 'libevent', '~> 2.1.12'