mirror of
https://github.com/genxium/DelayNoMore
synced 2024-12-26 03:39:00 +00:00
Updated use of GOPROXY param in Makefile.
This commit is contained in:
parent
ca5ba83b07
commit
9469b27348
@ -1,5 +1,6 @@
|
|||||||
PROJECTNAME=server.exe
|
PROJECTNAME=server.exe
|
||||||
ROOT_DIR=.
|
ROOT_DIR=.
|
||||||
|
GOPROXY=https://mirrors.aliyun.com/goproxy
|
||||||
all: help
|
all: help
|
||||||
|
|
||||||
gen-constants:
|
gen-constants:
|
||||||
@ -13,13 +14,13 @@ run-test-and-hotreload:
|
|||||||
ServerEnv=TEST CompileDaemon -log-prefix=false -build="go build" -command="./$(PROJECTNAME)"
|
ServerEnv=TEST CompileDaemon -log-prefix=false -build="go build" -command="./$(PROJECTNAME)"
|
||||||
|
|
||||||
build:
|
build:
|
||||||
go build -o $(ROOT_DIR)/$(PROJECTNAME)
|
GOPROXY=$(GOPROXY) go build -o $(ROOT_DIR)/$(PROJECTNAME)
|
||||||
|
|
||||||
run-prod: build-prod
|
run-prod: build-prod
|
||||||
./$(PROJECTNAME)
|
./$(PROJECTNAME)
|
||||||
|
|
||||||
build-prod:
|
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
|
.PHONY: help
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ all: help
|
|||||||
GOPROXY=https://mirrors.aliyun.com/goproxy
|
GOPROXY=https://mirrors.aliyun.com/goproxy
|
||||||
|
|
||||||
build:
|
build:
|
||||||
go build -o $(ROOT_DIR)/$(PROJECTNAME)
|
GOPROXY=$(GOPROXY) go build -o $(ROOT_DIR)/$(PROJECTNAME)
|
||||||
|
|
||||||
run: build
|
run: build
|
||||||
./$(PROJECTNAME)
|
./$(PROJECTNAME)
|
||||||
|
Loading…
Reference in New Issue
Block a user