From 9469b2734861d8633dab5ce673e92a297f393463 Mon Sep 17 00:00:00 2001 From: genxium Date: Mon, 28 Nov 2022 23:49:46 +0800 Subject: [PATCH] Updated use of GOPROXY param in Makefile. --- battle_srv/Makefile | 5 +++-- collider_visualizer/Makefile | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/battle_srv/Makefile b/battle_srv/Makefile index 925f43e..5056d08 100644 --- a/battle_srv/Makefile +++ b/battle_srv/Makefile @@ -1,5 +1,6 @@ PROJECTNAME=server.exe ROOT_DIR=. +GOPROXY=https://mirrors.aliyun.com/goproxy all: help gen-constants: @@ -13,13 +14,13 @@ run-test-and-hotreload: ServerEnv=TEST CompileDaemon -log-prefix=false -build="go build" -command="./$(PROJECTNAME)" build: - go build -o $(ROOT_DIR)/$(PROJECTNAME) + GOPROXY=$(GOPROXY) go build -o $(ROOT_DIR)/$(PROJECTNAME) run-prod: build-prod ./$(PROJECTNAME) build-prod: - go build -ldflags "-s -w -X main.VERSION=$(shell git rev-parse --short HEAD)-$(shell date "+%Y%m%d-%H:%M:%S")" -o $(ROOT_DIR)/$(PROJECTNAME) + GOPROXY=$(GOPROXY) go build -ldflags "-s -w -X main.VERSION=$(shell git rev-parse --short HEAD)-$(shell date "+%Y%m%d-%H:%M:%S")" -o $(ROOT_DIR)/$(PROJECTNAME) .PHONY: help diff --git a/collider_visualizer/Makefile b/collider_visualizer/Makefile index 87d47c5..256e47d 100644 --- a/collider_visualizer/Makefile +++ b/collider_visualizer/Makefile @@ -5,7 +5,7 @@ all: help GOPROXY=https://mirrors.aliyun.com/goproxy build: - go build -o $(ROOT_DIR)/$(PROJECTNAME) + GOPROXY=$(GOPROXY) go build -o $(ROOT_DIR)/$(PROJECTNAME) run: build ./$(PROJECTNAME)