From e1926523e3a27d58fe427a7c00d8716714221767 Mon Sep 17 00:00:00 2001 From: c9s Date: Fri, 29 Jan 2021 11:19:21 +0800 Subject: [PATCH] add targets for static file compilation --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9c2105df4..1a6a8d173 100644 --- a/Makefile +++ b/Makefile @@ -31,12 +31,20 @@ migrations: rockhopper compile --config rockhopper.yaml --output pkg/migrations docker: - GOPATH=$(PWD)/.mod go mod download - docker build --build-arg GO_MOD_CACHE=.mod --tag yoanlin/bbgo . + GOPATH=$(PWD)/_mod go mod download + docker build --build-arg GO_MOD_CACHE=_mod --tag yoanlin/bbgo . bash -c "[[ -n $(DOCKER_TAG) ]] && docker tag yoanlin/bbgo yoanlin/bbgo:$(DOCKER_TAG)" docker-push: docker push yoanlin/bbgo bash -c "[[ -n $(DOCKER_TAG) ]] && docker push yoanlin/bbgo:$(DOCKER_TAG)" +static: + (cd frontend && yarn export) + pkger + git commit pkged.go -m "update pkged static files" + +tools: + GO111MODULES=off go get github.com/markbates/pkger/cmd/pkger + .PHONY: dist migrations