Skip to content

Commit 272a134

Browse files
dmytrorykunfacebook-github-bot
authored andcommitted
Make sure that hermes-engine is updated with cocoapods. (#37148)
Summary: Pull Request resolved: #37148 This should fix https://github.com/facebook/react-native/issue/36945, which is also causing annoyance when doing the releases ## Changelog: [iOS][Changed] - Use contents of sdks/.hermesversion to let cocoapods recognize Hermes updates. Differential Revision: D45394241 fbshipit-source-id: 3304a7fbcd6303bd22cd7f0c0ce6a3bc2c13cb65
1 parent 97b2702 commit 272a134

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/react-native/scripts/cocoapods/jsengine.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ def setup_hermes!(react_native_path: "../node_modules/react-native", fabric_enab
3030
abort unless prep_status == 0
3131

3232
pod 'React-jsi', :path => "#{react_native_path}/ReactCommon/jsi"
33-
pod 'hermes-engine', :podspec => "#{react_native_path}/sdks/hermes/hermes-engine.podspec"
33+
# This `:tag => hermestag` below is only to tell CocoaPods to update hermes-engine when React Native version changes.
34+
# We have custom logic to compute the source for hermes-engine. See sdks/hermes-engine/*
35+
hermestag_file = File.join(react_native_path, "sdks", ".hermesversion")
36+
hermestag = File.exist?(hermestag_file) ? File.read().strip : ''
37+
pod 'hermes-engine', :podspec => "#{react_native_path}/sdks/hermes-engine/hermes-engine.podspec", :tag => hermestag
3438
pod 'React-hermes', :path => "#{react_native_path}/ReactCommon/hermes"
3539
pod 'libevent', '~> 2.1.12'
3640
end

0 commit comments

Comments
 (0)