From 6470340351f06db4115752c983652230fefa0977 Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Mon, 28 Jun 2021 10:25:47 +0200 Subject: [PATCH] update clean scripts --- package.json | 4 +++- scripts/{clean.sh => clean-android.sh} | 28 +++++--------------------- scripts/clean-ios.sh | 28 ++++++++++++++++++++++++++ scripts/clean-js.sh | 28 ++++++++++++++++++++++++++ 4 files changed, 64 insertions(+), 24 deletions(-) rename scripts/{clean.sh => clean-android.sh} (52%) create mode 100755 scripts/clean-ios.sh create mode 100755 scripts/clean-js.sh diff --git a/package.json b/package.json index 87e4ee2..4de1608 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,9 @@ "check-ios": "scripts/swiftformat.sh && scripts/swiftlint.sh", "check-cpp": "scripts/cpplint.sh", "check-all": "scripts/check-all.sh", - "clean": "scripts/clean.sh", + "clean-ios": "scripts/clean-ios.sh", + "clean-android": "scripts/clean-android.sh", + "clean-js": "scripts/clean-js.sh", "docs": "cd docs && yarn build", "prepack": "rm -rf android-tmp && mv android android-tmp && mv android-npm android", "postpack": "rm -rf android-npm && mv android android-npm && mv android-tmp android" diff --git a/scripts/clean.sh b/scripts/clean-android.sh similarity index 52% rename from scripts/clean.sh rename to scripts/clean-android.sh index 80f77de..235bb7e 100755 --- a/scripts/clean.sh +++ b/scripts/clean-android.sh @@ -4,6 +4,10 @@ cd "$(dirname "$0")" cd .. echo "Running clean script in $PWD" +cd android +echo "./gradlew clean" +./gradlew clean + echo "rm -rf node_modules" rm -rf node_modules echo "rm -rf yarn.lock" @@ -19,14 +23,7 @@ echo "rm -rf yarn.lock" rm -rf yarn.lock rm -rf package-lock.json -echo "rm -rf ~/Library/Caches/CocoaPods" -rm -rf ~/Library/Caches/CocoaPods -echo "rm -rf ios/Pods" -rm -rf ios/Pods -echo "rm -rf ios/Podfile.lock" -rm -rf ios/Podfile.lock -echo "rm -rf ~/Library/Developer/Xcode/DerivedData/*" -rm -rf ~/Library/Developer/Xcode/DerivedData/* +cd .. echo "rm -rf android/.cxx" rm -rf android/.cxx @@ -35,24 +32,9 @@ rm -rf android/.gradle echo "rm -rf android/build" rm -rf android/build -cd ios -echo "pod deintegrate" -pod deintegrate -echo "bundle clean" -bundle clean --force - -cd ../.. echo "yarn in $PWD" yarn cd example echo "yarn in $PWD" yarn - -cd ios -echo "bundle install" -bundle install -echo "pod setup" -bundle exec pod setup -echo "pod install" -bundle exec pod install diff --git a/scripts/clean-ios.sh b/scripts/clean-ios.sh new file mode 100755 index 0000000..b9b0e27 --- /dev/null +++ b/scripts/clean-ios.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +cd "$(dirname "$0")" +cd .. +echo "Running clean script in $PWD" + +echo "rm -rf ~/Library/Caches/CocoaPods" +rm -rf ~/Library/Caches/CocoaPods +echo "rm -rf ~/Library/Developer/Xcode/DerivedData/*" +rm -rf ~/Library/Developer/Xcode/DerivedData/* + +echo "cd example/ios" +cd example/ios +echo "rm -rf ios/Pods" +rm -rf Pods +echo "rm -rf ios/Podfile.lock" +rm -rf Podfile.lock +echo "pod deintegrate" +pod deintegrate +echo "bundle clean" +bundle clean --force + +echo "bundle install" +bundle install +echo "pod setup" +bundle exec pod setup +echo "pod install" +bundle exec pod install diff --git a/scripts/clean-js.sh b/scripts/clean-js.sh new file mode 100755 index 0000000..ce9aab7 --- /dev/null +++ b/scripts/clean-js.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +cd "$(dirname "$0")" +cd .. +echo "Running clean script in $PWD" + +echo "rm -rf node_modules" +rm -rf node_modules +echo "rm -rf yarn.lock" +rm -rf yarn.lock +rm -rf package-lock.json + +echo "cd example" +cd example + +echo "rm -rf node_modules" +rm -rf node_modules +echo "rm -rf yarn.lock" +rm -rf yarn.lock +rm -rf package-lock.json + +cd .. +echo "yarn in $PWD" +yarn + +cd example +echo "yarn in $PWD" +yarn