From 9c95aecc2ff48f0573ed7ffb6cfde3490cd2f796 Mon Sep 17 00:00:00 2001 From: c9s Date: Fri, 7 May 2021 19:16:02 +0800 Subject: [PATCH] fix linux build rules --- Makefile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index ee646a105..cf558612f 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,6 @@ bbgo-slim-linux-arm64: $(BIN_DIR) GOOS=linux GOARCH=arm64 go build -tags release -o $(BIN_DIR)/$@ ./cmd/bbgo bbgo-darwin: bbgo-darwin-arm64 bbgo-darwin-amd64 - GOOS=darwin GOARCH=$(TARGET_ARCH) go build -tags web,release -o $(BIN_DIR)/$@ ./cmd/bbgo bbgo-darwin-arm64: $(BIN_DIR) GOOS=darwin GOARCH=arm64 go build -tags web,release -o $(BIN_DIR)/$@ ./cmd/bbgo @@ -58,9 +57,6 @@ bbgo-darwin-arm64: $(BIN_DIR) bbgo-darwin-amd64: $(BIN_DIR) GOOS=darwin GOARCH=amd64 go build -tags web,release -o $(BIN_DIR)/$@ ./cmd/bbgo -bbgo-darwin: $(BIN_DIR) - GOOS=darwin GOARCH=$(TARGET_ARCH) go build -tags web,release -o $(BIN_DIR)/$@ ./cmd/bbgo - bbgo-slim-darwin-arm64: $(BIN_DIR) GOOS=darwin GOARCH=arm64 go build -tags release -o $(BIN_DIR)/$@ ./cmd/bbgo @@ -100,13 +96,15 @@ desktop: desktop-osx $(DIST_DIR)/$(VERSION): mkdir -p $(DIST_DIR)/$(VERSION) -$(DIST_DIR)/$(VERSION)/bbgo-$(VERSION)-darwin-amd64.tar.gz $(DIST_DIR)/$(VERSION)/bbgo-$(VERSION)-darwin-arm64.tar.gz: $(DIST_DIR)/$(VERSION) +$(DIST_DIR)/$(VERSION)/bbgo-$(VERSION)-linux-amd64.tar.gz $(DIST_DIR)/$(VERSION)/bbgo-$(VERSION)-darwin-amd64.tar.gz $(DIST_DIR)/$(VERSION)/bbgo-$(VERSION)-linux-arm64.tar.gz $(DIST_DIR)/$(VERSION)/bbgo-$(VERSION)-darwin-arm64.tar.gz: $(DIST_DIR)/$(VERSION) $(eval BIN_SUFFIX := $(subst bbgo-$(VERSION)-,,$(basename $(basename $(notdir $@))))) $(eval BIN_NAME := $(subst $(VERSION)-,,$(basename $(basename $(notdir $@))))) $(MAKE) bbgo-$(BIN_SUFFIX) $(MAKE) bbgo-slim-$(BIN_SUFFIX) tar -C $(BIN_DIR) -cvzf $@ $(BIN_NAME) +ifeq ($(SIGN),1) gpg --yes --detach-sign --armor $@ +endif dist-bbgo-linux: static $(DIST_DIR)/$(VERSION)/bbgo-$(VERSION)-linux-arm64.tar.gz $(DIST_DIR)/$(VERSION)/bbgo-$(VERSION)-linux-amd64.tar.gz dist-bbgo-darwin: static $(DIST_DIR)/$(VERSION)/bbgo-$(VERSION)-darwin-arm64.tar.gz $(DIST_DIR)/$(VERSION)/bbgo-$(VERSION)-darwin-amd64.tar.gz