From 7230897b94e4a69116d735378478380182a91c88 Mon Sep 17 00:00:00 2001 From: Pedro Pombeiro Date: Thu, 18 Jul 2019 14:22:41 +0200 Subject: [PATCH] nix: Allow some build directories to stay in mobile node_modules (for caching) Signed-off-by: Pedro Pombeiro --- nix/mobile/reset-node_modules.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nix/mobile/reset-node_modules.sh b/nix/mobile/reset-node_modules.sh index 9e2fec4b40..aee86deab5 100755 --- a/nix/mobile/reset-node_modules.sh +++ b/nix/mobile/reset-node_modules.sh @@ -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."