From 73f7d944ab24ccc2319d6fc32d2e8eea46d6a7c2 Mon Sep 17 00:00:00 2001 From: Lev Vereshchagin Date: Wed, 30 Mar 2022 11:33:19 +0300 Subject: [PATCH] Ignore apps that have no frontend code instead of failing --- images/nginx/install-app.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/images/nginx/install-app.sh b/images/nginx/install-app.sh index 232842f2..4d634cf6 100755 --- a/images/nginx/install-app.sh +++ b/images/nginx/install-app.sh @@ -4,8 +4,18 @@ set -x APP=$1 +cleanup() { + rm -rf "apps/$APP" + rm -rf sites/assets/* +} + cd /frappe-bench +if ! test -d "apps/$APP/$APP/public"; then + cleanup + exit 0 +fi + # Add all not built assets cp -r "apps/$APP/$APP/public" "/out/assets/$APP" @@ -19,6 +29,4 @@ echo "$APP" >>sites/apps.txt yarn --cwd apps/frappe run production --app "$APP" cp -r sites/assets /out -# Cleanup -rm -rf "apps/$APP" -rm -rf sites/assets/* +cleanup