Skip to content

Commit 845eee4

Browse files
hramosfacebook-github-bot
authored andcommitted
Allow arbitrary location for third-party iOS dependency cache
Summary: RNTester currently has four third party dependencies that are fetched from the network at build time: - glog - double-conversion - boost - folly These dependencies are cached to ~/.rncache by default. This location may not be ideal for use in CI, therefore the cache location is now made configurable via a RN_CACHE_DIR envvar. Reviewed By: cpojer Differential Revision: D15141391 fbshipit-source-id: b51d749412c49500a657bd18e4c9520ddb30ea2c
1 parent 005b455 commit 845eee4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/ios-install-third-party.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
# This source code is licensed under the MIT license found in the
55
# LICENSE file in the root directory of this source tree.
66

7-
if [ -d "$HOME/.rncache" ]; then
7+
if [ -n "$RN_CACHE_DIR" ] && [ -d "$RN_CACHE_DIR" ]; then
8+
cachedir="$RN_CACHE_DIR"
9+
elif [ -d "$HOME/.rncache" ]; then
810
cachedir="$HOME/.rncache" # react-native 0.57.8 and older
911
else
1012
cachedir="$HOME/Library/Caches/com.facebook.ReactNativeBuild"

0 commit comments

Comments
 (0)