10 Star 98 Fork 18

北京长亭科技有限公司/SafeLine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
xiaobing.wang 提交于 2024-07-04 17:51 . feat: add management
GO = GO111MODULE=on go
#GO = GO111MODULE=on GOOS=linux GOARCH=amd64 go
GOBUILD = $(GO) build -mod=readonly
GOTEST = $(GO) test -v -p 1 -coverprofile=coverage-management.out
STAMP = $(shell date +%s)
GITHASH = $(shell git rev-parse --short=8 HEAD)
GITTAG = $(shell git describe --tags --abbrev=0)
BUILDFLAGS := -ldflags "-X main.buildstamp=$(STAMP) -X main.githash=$(GITHASH) -X main.version=$(GITTAG)"
pkgs = ./...
all: build-all
.PHONY: build-all
build-all: proto build-webserver build-tcd
.PHONY: build-webserver
build-webserver:
cd webserver && $(GOBUILD) $(BUILDFLAGS) -o ../build/webserver main.go
.PHONY: build-tcd
build-tcd:
cd tcontrollerd && CGO_ENABLED=0 $(GOBUILD) $(BUILDFLAGS) -o ../build/tcontrollerd main.go
.PHONY: test
test:
$(GOTEST) -failfast $(pkgs)
.PHONY: proto
proto:
@./scripts/genproto.sh
.PHONY: lint
lint:
# 'go list' needs to be executed before staticcheck to prepopulate the modules cache.
# Otherwise staticcheck might fail randomly for some reason not yet explained.
$(GO) list -e -compiled -test=true -export=false -deps=true -find=false -tags= -- ./... > /dev/null
goimports -local chaitin.cn -w $$(find . -type f -name '*.go' -not -path "./vendor/*")
golangci-lint version
cd webserver && golangci-lint run -v --skip-dirs vendor --deadline 10m
.PHONY: clean
clean:
rm -rf build
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/beijing-changting/SafeLine.git
git@gitee.com:beijing-changting/SafeLine.git
beijing-changting
SafeLine
SafeLine
main

搜索帮助