Chore/update clear script

This commit is contained in:
Maria Zadnepryanets
2022-08-15 19:01:28 +00:00
parent c31d4252bb
commit 7d2c7d4844
6 changed files with 43 additions and 31 deletions
+7 -4
View File
@@ -1,6 +1,6 @@
#!/bin/bash
echo "\x1b[35;01m""Start clearing ios cache...""\x1b[39;49;00m"
echo "\x1b[35;01m""Start clearing iOS cache...""\x1b[39;49;00m"
echo "Remove all Xcode derived data..."
rm -rf ~/Library/Developer/Xcode/DerivedData
@@ -14,8 +14,8 @@ rm -rf ios/Pods/*
echo "Remove Podfile.lock..."
rm Podfile.lock
echo "Wipe iOS build artifacts..."
rm -rf ios/build && (killall Xcode || true) && xcrun -k && cd ios && xcodebuild -alltargets clean && cd .. && rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache" && rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache" && rm -fr ~/Library/Developer/Xcode/DerivedData/ && rm -fr ~/Library/Caches/com.apple.dt.Xcode/
echo "Close XCode and wipe iOS build artifacts..."
(killall Xcode || true) && xcrun -k && cd ios && xcodebuild -alltargets clean && cd .. && rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache" && rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache" && rm -fr ~/Library/Developer/Xcode/DerivedData/ && rm -fr ~/Library/Caches/com.apple.dt.Xcode/
echo "Wipe system iOS Pods cache..."
pod cache clean --all
@@ -23,4 +23,7 @@ pod cache clean --all
echo "Wipe user iOS Pods cocoapods cache..."
rm -rf ~/.cocoapods
echo "\x1b[35;01m""Done!""\x1b[39;49;00m"
echo "Pods install..."
cd ios && pod install && cd ..
echo "\x1b[35;01m""Done clearing iOS cache!""\x1b[39;49;00m"