nix: Allow some build directories to stay in mobile node_modules (for caching)
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
This commit is contained in:
parent
75d0af862f
commit
7230897b94
|
@ -27,7 +27,12 @@ needCopyModules=1
|
|||
if [ -d "$nodeModulesDir" ]; then
|
||||
if [ -f "$nodeModulesDir/.copied~" ]; then
|
||||
echo "Checking for modifications in node_modules..."
|
||||
modifiedFiles=( $(find $nodeModulesDir -writable -type f -newer $nodeModulesDir/.copied~ -not \( -path "$nodeModulesDir/react-native/third-party/*" -prune -o -path './resources/icons/*' -prune \) -print) )
|
||||
modifiedFiles=( $(find $nodeModulesDir -writable -type f -newer $nodeModulesDir/.copied~ \
|
||||
-not \( -path "$nodeModulesDir/react-native/third-party/*" -prune \
|
||||
-o -path "$nodeModulesDir/react-native/ReactAndroid/build/*" -prune \
|
||||
-o -path "$nodeModulesDir/*/android/build/*" -prune \
|
||||
-o -path "$nodeModulesDir/realm/src/*" -prune \
|
||||
-o -path './resources/icons/*' -prune \) -print) )
|
||||
if [ ${#modifiedFiles[@]} -eq 0 ]; then
|
||||
needCopyModules=0
|
||||
echo "No modifications detected."
|
||||
|
|
Loading…
Reference in New Issue