Skip to content

Commit

Permalink
Allow arbitrary location for third-party iOS dependency cache
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hramos authored and facebook-github-bot committed Apr 30, 2019
1 parent 005b455 commit 845eee4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/ios-install-third-party.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 845eee4

Please sign in to comment.