Skip to content
Permalink
Browse files

Change location of iOS build cache directory to ~/Library/Caches/ (#2…

…2688)

Summary:
Instead of using ~/.rncache use the special Caches directory designed for caching files. This fixes #21780.

Changelog:
----------

[iOS] [Changed] - Moved iOS build cache directory from ~/.rncache to ~/Library/Caches/com.facebook.ReactNativeBuild
Pull Request resolved: #22688

Differential Revision: D13817171

Pulled By: cpojer

fbshipit-source-id: af03dda66f9d49f4fe88bd050b359ccb7abb889a
  • Loading branch information...
sryze authored and facebook-github-bot committed Jan 25, 2019
1 parent 103880b commit 1024dc251e1f4777052b7c41807ea314672bb13a
Showing with 7 additions and 3 deletions.
  1. +7 −3 scripts/ios-install-third-party.sh
@@ -4,14 +4,18 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

cachedir="$HOME/.rncache"
if [ -d "$HOME/.rncache" ]; then
cachedir="$HOME/.rncache" # react-native 0.57.8 and older
else
cachedir="$HOME/Library/Caches/com.facebook.ReactNativeBuild"
fi
mkdir -p "$cachedir"

function file_fail () {
cachefile=$1
msg=$2

echo "$msg. Debug info:" 2>&1
echo "$msg. Debug info:" 2>&1
ls -l "$cachefile" 2>&1
shasum "$cachefile" 2>&1
exit 1
@@ -29,7 +33,7 @@ function fetch_and_unpack () {
while true; do
if [ -f "$cachedir/$file" ]; then
if shasum -p "$cachedir/$file" |
awk -v hash="$hash" '{exit $1 != hash}'; then
awk -v hash="$hash" '{exit $1 != hash}'; then
break
else
echo "Incorrect hash:" 2>&1

0 comments on commit 1024dc2

Please sign in to comment.
You can’t perform that action at this time.