From c296bacbe78c1ec2289d58ba6767183e0df33196 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 26 Oct 2023 18:02:43 +0200 Subject: [PATCH] refactor(build): clear tmp build directory Signed-off-by: rjshrjndrn --- api/build.sh | 4 ++++ assist-stats/build.sh | 4 ++++ assist/build.sh | 6 +++++- peers/build.sh | 4 ++++ sourcemap-reader/build.sh | 6 +++++- 5 files changed, 22 insertions(+), 2 deletions(-) diff --git a/api/build.sh b/api/build.sh index 67df673ea..b75311077 100644 --- a/api/build.sh +++ b/api/build.sh @@ -52,6 +52,10 @@ function build_api(){ [[ $1 == "ee" ]] && { destination="_api_ee" } + [[ -d ../${destination} ]] && { + echo "Removing previous build cache" + rm -rf ../${destination} + } cp -R ../api ../${destination} cd ../${destination} || exit_err 100 tag="" diff --git a/assist-stats/build.sh b/assist-stats/build.sh index 2ac13e899..2bc8c7c6c 100644 --- a/assist-stats/build.sh +++ b/assist-stats/build.sh @@ -54,6 +54,10 @@ function build_api(){ [[ $1 == "ee" ]] && { destination="_assist_stats_ee" } + [[ -d ../${destination} ]] && { + echo "Removing previous build cache" + rm -rf ../${destination} + } cp -R ../assist-stats ../${destination} cd ../${destination} || exit_err 100 tag="" diff --git a/assist/build.sh b/assist/build.sh index 3f98bcf36..116f12d94 100644 --- a/assist/build.sh +++ b/assist/build.sh @@ -39,6 +39,10 @@ function build_api(){ [[ $1 == "ee" ]] && { destination="_assist_ee" } + [[ -d ../${destination} ]] && { + echo "Removing previous build cache" + rm -rf ../${destination} + } cp -R ../assist ../${destination} cd ../${destination} @@ -65,4 +69,4 @@ check_prereq build_api $1 if [[ $PATCH -eq 1 ]]; then update_helm_release assist -fi \ No newline at end of file +fi diff --git a/peers/build.sh b/peers/build.sh index 4c5f01679..5a72fc2e3 100644 --- a/peers/build.sh +++ b/peers/build.sh @@ -40,6 +40,10 @@ function build_api(){ [[ $1 == "ee" ]] && { destination="_peers_ee" } + [[ -d ../${destination} ]] && { + echo "Removing previous build cache" + rm -rf ../${destination} + } cp -R ../peers ../${destination} cd ../${destination} cp -R ../assist/utils . diff --git a/sourcemap-reader/build.sh b/sourcemap-reader/build.sh index 9181bff6b..215302f20 100644 --- a/sourcemap-reader/build.sh +++ b/sourcemap-reader/build.sh @@ -46,6 +46,10 @@ function build_api(){ [[ $1 == "ee" ]] && { destination="_smr_ee" } + [[ -d ../${destination} ]] && { + echo "Removing previous build cache" + rm -rf ../${destination} + } cp -R ../sourcemap-reader ../${destination} cd ../${destination} cp -R ../assist/utils . @@ -75,4 +79,4 @@ build_api $1 echo buil_complete if [[ $PATCH -eq 1 ]]; then update_helm_release sourcemapreader -fi \ No newline at end of file +fi