-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Pull Request resolved: #35034 Currently, when creating an app using the command: `npx react-native init MyApp --version nightly` iOS fails to install the dependencies because it does not find a proper tarball to run Hermes. This diff solve the problem by fetching the Hermes tarball that is created by the CI while building the nightly. ## Changelog: [iOS][Fixed] - Make the nightly work with the proper Hermes tarball Reviewed By: cortinico Differential Revision: D40512418 fbshipit-source-id: f510f84be9f19807236091687df5e13961103318
- Loading branch information
1 parent
be6f656
commit 1546666
Showing
4 changed files
with
66 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
require 'net/http' | ||
require 'rexml/document' | ||
|
||
# This function downloads the nightly prebuilt version of Hermes based on the passed version | ||
# and save it in the node_module/react_native/sdks/downloads folder | ||
# It then returns the path to the hermes tarball | ||
# | ||
# Parameters | ||
# - react_native_path: the path to the React Native folder in node modules. It is used as root path to store the Hermes tarball | ||
# - version: the version of React Native that requires the Hermes tarball | ||
# Returns: the path to the downloaded Hermes tarball | ||
def download_nightly_hermes(react_native_path, version) | ||
# TODO: convert hermes-ios to hermes-ios-debug | ||
params = "r=snapshots\&g=com.facebook.react\&a=react-native-artifacts\&c=hermes-ios-debug\&e=tar.gz\&v=#{version}-SNAPSHOT" | ||
tarball_url = "http://oss.sonatype.org/service/local/artifact/maven/redirect\?#{params}" | ||
|
||
destination_folder = "#{react_native_path}/sdks/downloads" | ||
destination_path = "#{destination_folder}/hermes-ios.tar.gz" | ||
|
||
`mkdir -p "#{destination_folder}" && curl "#{tarball_url}" -Lo "#{destination_path}"` | ||
return destination_path | ||
end |