From 88fa872896d1566c196b5157fdb5c2c415756501 Mon Sep 17 00:00:00 2001 From: fortmarek Date: Tue, 31 May 2022 04:43:00 -0700 Subject: [PATCH] Fix downloading prebuilt hermes from the Github release (#33935) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: This: ```ruby source[:http] = `https://github.com/facebook/react-native/releases/download/v#{version}/hermes-runtime-darwin-v#{version}.tar.gz` ``` currently fails with the following error: ``` [!] Failed to load 'hermes-engine' podspec: [!] Invalid `hermes-engine.podspec` file: No such file or directory - https://github.com/facebook/react-native/releases/download/v0.69.0-rc.4/hermes-runtime-darwin-v0.69.0-rc.4.tar.gz. ``` For some reasons, the string with backticks is treated differently than with double quotes since this works: ```ruby source[:http] = "https://github.com/facebook/react-native/releases/download/v#{version}/hermes-runtime-darwin-v#{version}.tar.gz" ``` ## Changelog [Internal] - Fix downloading prebuilt hermes from the Github release Pull Request resolved: https://github.com/facebook/react-native/pull/33935 Test Plan: - `npx react-native init RN069RC4 --version 0.69.0-rc.4` - in the created project, run `pod install` with hermes enabled - run `git init && git add . && git commit -m "Initial commit" && git remote add origin https://github.com/fortmarek/some-fake-repository` (this is necessary due to an unrelated bug in the RC4) - observe error - update `node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec` with the change from this commit - run `pod install` - 🎉 Reviewed By: dmitryrykun Differential Revision: D36775047 Pulled By: cortinico fbshipit-source-id: 3772adca32fe9898cde33c187d19b7b181af3677 --- sdks/hermes-engine/hermes-engine.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/hermes-engine/hermes-engine.podspec b/sdks/hermes-engine/hermes-engine.podspec index 60bed4f5fd0..0546d2ba859 100644 --- a/sdks/hermes-engine/hermes-engine.podspec +++ b/sdks/hermes-engine/hermes-engine.podspec @@ -28,7 +28,7 @@ elsif currentremote.end_with?("facebook/react-native.git") and currentbranch.end source[:git] = git source[:commit] = `git ls-remote https://github.com/facebook/hermes main | cut -f 1`.strip else - source[:http] = `https://github.com/facebook/react-native/releases/download/v#{version}/hermes-runtime-darwin-v#{version}.tar.gz` + source[:http] = "https://github.com/facebook/react-native/releases/download/v#{version}/hermes-runtime-darwin-v#{version}.tar.gz" end module HermesHelper