From 3aed794c79d923c00ec7a1759fea01bffaea1b27 Mon Sep 17 00:00:00 2001 From: TonyQ Date: Wed, 8 Dec 2021 09:33:47 +0000 Subject: [PATCH] refine make process for #316 --- .github/workflows/release.yml | 1 - .gitignore | 3 +++ Makefile | 9 ++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 53c2135e8..52fd330e3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/.gitignore b/.gitignore index d36fd8d9c..93a71814a 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,6 @@ /config/bbgo.yaml /pkg/server/assets.go + +node_modules +yarn.lock diff --git a/Makefile b/Makefile index 014888b05..138840689 100644 --- a/Makefile +++ b/Makefile @@ -24,8 +24,10 @@ $(BIN_DIR): # build native bbgo -bbgo: - go build -tags web,release -o $(BIN_DIR)/$@ ./cmd/bbgo +bbgo: static bbgo-full + +bbgo-full: + go build -tags web,release -o $(BIN_DIR)/bbgo ./cmd/bbgo # build native bbgo (slim version) bbgo-slim: @@ -147,7 +149,8 @@ docker-push: bash -c "[[ -n $(DOCKER_TAG) ]] && docker push yoanlin/bbgo:$(DOCKER_TAG)" frontend/out/index.html: - (cd frontend && yarn export) + cd frontend && yarn install + cd frontend && yarn export pkg/server/assets.go: frontend/out/index.html go run ./util/embed -package server -output $@ $(FRONTEND_EXPORT_DIR)