From 7a7f881d23bedcb5db8f2a25120498a1c7f57c21 Mon Sep 17 00:00:00 2001 From: appflowy Date: Thu, 16 Jun 2022 08:30:26 +0800 Subject: [PATCH] chore: udpate the clean scripto --- frontend/scripts/clean.sh | 5 ++++- frontend/scripts/makefile/tool.toml | 8 +++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/frontend/scripts/clean.sh b/frontend/scripts/clean.sh index aa3b3bd15d..619853e2fb 100644 --- a/frontend/scripts/clean.sh +++ b/frontend/scripts/clean.sh @@ -4,8 +4,11 @@ cd rust-lib cargo clean +cd ../../shared-lib +cargo clean + CACHE_FILE=lib-infra/.cache -if [ -f "$CACHE_FILE" ]; then +if [ -d "$CACHE_FILE" ]; then echo "Remove $CACHE_FILE" rm -rf $CACHE_FILE fi diff --git a/frontend/scripts/makefile/tool.toml b/frontend/scripts/makefile/tool.toml index bd0504f6fc..fcd1d41763 100644 --- a/frontend/scripts/makefile/tool.toml +++ b/frontend/scripts/makefile/tool.toml @@ -7,7 +7,11 @@ script = [ cd ../../shared-lib cargo clean - rm -rf lib-infra/.cache + CACHE_FILE=lib-infra/.cache + if [ -d "$CACHE_FILE" ]; then + echo "Remove $CACHE_FILE" + rm -rf $CACHE_FILE + fi """, ] script_runner = "@shell" @@ -19,8 +23,6 @@ script = [ cargo clean cd ../../shared-lib - cargo clean - rmdir /s/q "lib-infra/.cache" """, ]