add targets for static file compilation

This commit is contained in:
c9s 2021-01-29 11:19:21 +08:00
parent 73ba05cb3e
commit e1926523e3

View File

@ -31,12 +31,20 @@ migrations:
rockhopper compile --config rockhopper.yaml --output pkg/migrations rockhopper compile --config rockhopper.yaml --output pkg/migrations
docker: docker:
GOPATH=$(PWD)/.mod go mod download GOPATH=$(PWD)/_mod go mod download
docker build --build-arg GO_MOD_CACHE=.mod --tag yoanlin/bbgo . docker build --build-arg GO_MOD_CACHE=_mod --tag yoanlin/bbgo .
bash -c "[[ -n $(DOCKER_TAG) ]] && docker tag yoanlin/bbgo yoanlin/bbgo:$(DOCKER_TAG)" bash -c "[[ -n $(DOCKER_TAG) ]] && docker tag yoanlin/bbgo yoanlin/bbgo:$(DOCKER_TAG)"
docker-push: docker-push:
docker push yoanlin/bbgo docker push yoanlin/bbgo
bash -c "[[ -n $(DOCKER_TAG) ]] && docker push yoanlin/bbgo:$(DOCKER_TAG)" 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 .PHONY: dist migrations