Skip to content

Commit a19578d

Browse files
committed
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 112d678 commit a19578d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sdks/hermes-engine/hermes-engine.podspec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ if version == '1000.0.0'
2828
source[:commit] = `git ls-remote https://github.com/facebook/hermes main | cut -f 1`.strip
2929
elsif currentremote.strip.end_with?("facebook/react-native.git") and currentbranch.strip.end_with?("-stable")
3030
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")
31+
hermestag_file = File.join(__dir__, "..", ".hermesversion")
32+
hermestag = File.read(hermestag_file).strip
3133
source[:git] = git
32-
source[:commit] = `git ls-remote https://github.com/facebook/hermes main | cut -f 1`.strip
34+
source[:tag] = hermestag
3335
else
3436
source[:http] = "https://github.com/facebook/react-native/releases/download/v#{version}/hermes-runtime-darwin-v#{version}.tar.gz"
3537
end

0 commit comments

Comments
 (0)