Skip to content

Commit 0a71b43

Browse files
chrfalchmeta-codesync[bot]
authored andcommitted
Update the sourceproperty to avoid multiple downloads (#54031)
Summary: Pull Request resolved: #54031 This commit updates the cocoapods source for RNDependencies so that the source for the package is the locally downloaded file so we don't download twice! ## Changelog: [IOS] [FIXED] - Update the `source`property to avoid multiple downloads Test Plan: Run: ``` RCT_USE_RN_DEP=1 RCT_USE_PREBUILT_RNCORE=1 bundle exec pod install ``` Multiple times and observe that the dependencies are not downloaded multiple times. Reviewed By: christophpurrer Differential Revision: D83753188 Pulled By: cipolleschi fbshipit-source-id: e3fedca921b0ff9ba10ec3e5a7ba18dfbdffc3ba
1 parent f0f8b95 commit 0a71b43

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,10 @@ def self.podspec_source_download_prebuild_release_tarball()
158158

159159
url = release_tarball_url(@@react_native_version, :debug)
160160
rndeps_log("Using tarball from URL: #{url}")
161-
download_stable_rndeps(@@react_native_path, @@react_native_version, :debug)
161+
destinationDebug = download_stable_rndeps(@@react_native_path, @@react_native_version, :debug)
162162
download_stable_rndeps(@@react_native_path, @@react_native_version, :release)
163-
return {:http => url}
163+
164+
return {:http => URI::File.build(path: destinationDebug).to_s }
164165
end
165166

166167
def self.release_tarball_url(version, build_type)

0 commit comments

Comments
 (0)