From 845eee403e1cd3cb36935ef142f411f2b5075346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ramos?= Date: Tue, 30 Apr 2019 09:44:00 -0700 Subject: [PATCH] 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 --- scripts/ios-install-third-party.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/ios-install-third-party.sh b/scripts/ios-install-third-party.sh index 4b64c70c236..6638acbcdb7 100755 --- a/scripts/ios-install-third-party.sh +++ b/scripts/ios-install-third-party.sh @@ -4,7 +4,9 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -if [ -d "$HOME/.rncache" ]; then +if [ -n "$RN_CACHE_DIR" ] && [ -d "$RN_CACHE_DIR" ]; then + cachedir="$RN_CACHE_DIR" +elif [ -d "$HOME/.rncache" ]; then cachedir="$HOME/.rncache" # react-native 0.57.8 and older else cachedir="$HOME/Library/Caches/com.facebook.ReactNativeBuild"