2 Star 1 Fork 2

OceanBase / obagent

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Makefile.common 1.40 KB
一键复制 编辑 原始数据 按行查看 历史
chris-sun 提交于 2021-11-11 20:00 . fix test
PROJECT=obagent
PROCESSOR=2
VERSION=1.0
PWD ?= $(shell pwd)
GO := GO111MODULE=on GOPROXY=https://mirrors.aliyun.com/goproxy/,direct go
BUILD_FLAG := -p $(PROCESSOR)
GOBUILD := $(GO) build $(BUILD_FLAG)
GOBUILDCOVERAGE := $(GO) test -covermode=count -coverpkg="../..." -c .
GOCOVERAGE_FILE := tests/coverage.out
GOCOVERAGE_REPORT := tests/coverage-report
GOTEST := OB_AGENT_CONFIG_PATH=$(PWD) $(GO) test -tags test -covermode=count -coverprofile=$(GOCOVERAGE_FILE) -p $(PROCESSOR)
GO_RACE_FLAG =-race
LDFLAGS += -X "github.com/oceanbase/obagent/config.AgentVersion=${VERSION}"
#LDFLAGS += -X "github.com/oceanbase/obagent/config.ReleaseVersion=$(shell git describe --tags --dirty --always)"
LDFLAGS += -X "github.com/oceanbase/obagent/config.BuildTimestamp=$(shell date -u '+%Y-%m-%d %H:%M:%S')"
LDFLAGS += -X "github.com/oceanbase/obagent/config.GitBranch=$(shell git rev-parse --abbrev-ref HEAD)"
LDFLAGS += -X "github.com/oceanbase/obagent/config.GitHash=$(shell git rev-parse HEAD)"
LDFLAGS_DEBUG = -X "github.com/oceanbase/obagent/config.Mode=debug"
LDFLAGS_RELEASE = -X "github.com/oceanbase/obagent/config.Mode=release"
MONAGENT_LDFLAGS = $(LDFLAGS) -X "github.com/oceanbase/obagent/config.CurProcess=monagent"
GOFILES ?= $(shell git ls-files '*.go')
GOTEST_PACKAGES = $(shell go list ./... | grep -v -f tests/excludes.txt)
UNFMT_FILES ?= $(shell gofmt -l -s $(filter-out , $(GOFILES)))
1
https://gitee.com/oceanbase/obagent.git
git@gitee.com:oceanbase/obagent.git
oceanbase
obagent
obagent
master

搜索帮助