Skip to content

Commit

Permalink
Remove web during build only if yarn is installed
Browse files Browse the repository at this point in the history
Signed-off-by: Yilun <[email protected]>
  • Loading branch information
yilunzhang committed Apr 7, 2021
1 parent 0657e46 commit 0580282
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0580282

Please sign in to comment.