From 0580282e9eff40e4f59fa1476d55533adfbddafc Mon Sep 17 00:00:00 2001 From: Yilun Date: Tue, 23 Feb 2021 17:11:25 -0800 Subject: [PATCH] Remove web during build only if yarn is installed Signed-off-by: Yilun --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f1da434e2..ed74f707a 100644 --- a/Makefile +++ b/Makefile @@ -21,8 +21,7 @@ help: ## Show available options with this Makefile @grep -F -h "##" $(MAKEFILE_LIST) | grep -v grep | awk 'BEGIN { FS = ":.*?##" }; { printf "%-15s %s\n", $$1,$$2 }' web: $(shell find dashboard/web -type f -not -path "dashboard/web/node_modules/*" -not -path "dashboard/web/dist/*" -not -path "dashboard/web/.nuxt/*") - @rm -rf web - -@cd dashboard/web && yarn install && yarn build && cp -a ./dist ../../web + -@cd dashboard/web && yarn install && yarn build && rm -rf ../../web && cp -a ./dist ../../web .PHONY: build build: web