Files
FastDeploy/fastdeploy/golang_router/Makefile
T
mouxin 0a92e96f20 [Feature] Add Golang-based Router for Request Scheduling and Load Balancing (#5882)
* [Feature] add golang router

* [Feature] add golang router

* [Feature] add golang router

* [Feature] add golang router

* [Feature] add golang router

* [Feature] Add Golang-based Router for Request Scheduling and Load Balancing

* [Feature] Add Golang-based Router for Request Scheduling and Load Balancing

* [Feature] Add Golang-based Router for Request Scheduling and Load Balancing

* [Feature] Add Golang-based Router for Request Scheduling and Load Balancing

---------

Co-authored-by: mouxin <mouxin@baidu.com>
2026-01-07 21:28:08 +08:00

32 lines
666 B
Makefile

HOMEDIR := $(shell pwd)
OUTDIR := /usr/local/bin
export GOENV = $(HOMEDIR)/go.env
GOPKGS := $$(go list ./...| grep -vE "vendor")
# make, make all
all: prepare compile
prepare:
git version # 低于 2.17.1 可能不能正常工作
go env
go mod download || go mod download -x # 下载 依赖
#make compile
compile: build
build:
go build -o $(OUTDIR)/fd-router ./cmd
# make test, test your code
test: prepare
go test -race -timeout=120s -v -cover $(GOPKGS) -coverprofile=coverage.out | tee unittest.txt
# make clean
clean:
go clean
rm -rf $(OUTDIR)
# avoid filename conflict and speed up build
.PHONY: all prepare compile test package clean build