Merge pull request #317 from tony1223/feature/316-update-make-process

refine make process for #316
This commit is contained in:
Yo-An Lin 2021-12-08 19:54:27 +08:00 committed by GitHub
commit 025c425117
3 changed files with 9 additions and 5 deletions

View File

@ -27,7 +27,6 @@ jobs:
- name: Build
run: |
npm install --global yarn
(cd frontend && yarn install)
make dist VERSION=${{ steps.get_version.outputs.VERSION }}
shell: bash
- name: Create Release

2
.gitignore vendored
View File

@ -32,3 +32,5 @@
/config/bbgo.yaml
/pkg/server/assets.go
node_modules

View File

@ -24,8 +24,8 @@ $(BIN_DIR):
# build native bbgo
bbgo:
go build -tags web,release -o $(BIN_DIR)/$@ ./cmd/bbgo
bbgo: static
go build -tags web,release -o $(BIN_DIR)/bbgo ./cmd/bbgo
# build native bbgo (slim version)
bbgo-slim:
@ -146,8 +146,11 @@ docker-push:
docker push yoanlin/bbgo
bash -c "[[ -n $(DOCKER_TAG) ]] && docker push yoanlin/bbgo:$(DOCKER_TAG)"
frontend/out/index.html:
(cd frontend && yarn export)
frontend/node_modules:
cd frontend && yarn install
frontend/out/index.html: frontend/node_modules
cd frontend && yarn export
pkg/server/assets.go: frontend/out/index.html
go run ./util/embed -package server -output $@ $(FRONTEND_EXPORT_DIR)