Skip to content

Commit 46a9edc

Browse files
kelsetfacebook-github-bot
authored andcommitted
Hermes pod: change logic to use the hermes tag to set the pod source correctly (#34221)
Summary: This fix is necessarly to ensure that when working on the codebase in the `0.XX-stable` branches (ex. when you are working on a release) the Hermes podfile is correctly set against the right commit for that branch, and not latest commit from main branch of Hermes repo. I didn't add a check to verify that the file `.hermesversion` exists because I think it's safe to assume that the file and the tag correctly exists when this step (doing a pod install on the `0.XX-stable` branch). Once this is merged, we need to cherry pick it on both the 0.69 and 0.70 branches ## Changelog [iOS] [Fixed] - Hermes pod: change logic to use the hermes tag to set the pod source correctly Pull Request resolved: #34221 Test Plan: * git clone the repo * checkout 0.69-stable branch * follow https://reactnative.dev/contributing/release-testing * without this commit, when testing RNTester + iOS + Hermes the app will insta-crash on opening * with it, the app gets build successfully Reviewed By: cortinico Differential Revision: D37957660 Pulled By: cipolleschi fbshipit-source-id: 4e50099ed712b1ad8e6439822e3f530142982c1b
1 parent 1d997ce commit 46a9edc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sdks/hermes-engine/hermes-engine.podspec

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ elsif version == '1000.0.0'
3131
source[:commit] = `git ls-remote https://github.com/facebook/hermes main | cut -f 1`.strip
3232
elsif currentremote.strip.end_with?("facebook/react-native.git") and currentbranch.strip.end_with?("-stable")
3333
Pod::UI.puts '[Hermes] Detected that you are on a React Native release branch, building Hermes from source...'.yellow if Object.const_defined?("Pod::UI")
34+
hermestag_file = File.join(__dir__, "..", ".hermesversion")
35+
hermestag = File.read(hermestag_file).strip
3436
source[:git] = git
35-
source[:commit] = `git ls-remote https://github.com/facebook/hermes main | cut -f 1`.strip
37+
source[:tag] = hermestag
3638
else
3739
source[:http] = "https://github.com/facebook/react-native/releases/download/v#{version}/hermes-runtime-darwin-v#{version}.tar.gz"
3840
end

0 commit comments

Comments
 (0)