-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 使用makefile编译 - 移动配置文件位置 - 完善readme
- Loading branch information
Showing
7 changed files
with
141 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
GOCMD=go | ||
GOBUILD=${GOCMD} build | ||
GOCLEAN=${GOCMD} clean | ||
GOTEST=${GOCMD} test | ||
GOGET=${GOCMD} get | ||
VERSION=1.0 | ||
DATE= `date +%FT%T%z` | ||
|
||
|
||
BINARY_NAME_SERVER="xprober-server" | ||
BINARY_NAME_AGENT="xprober-agent" | ||
BINARY_LINUX=${BINARY_NAME}_linux | ||
BUILDUSER="ning1875" | ||
LDFLAGES=" -X 'github.com/prometheus/common/version.BuildUser=${BUILDUSER}' -X 'github.com/prometheus/common/version.BuildDate=`date`' " | ||
all: deps build | ||
deps: | ||
export GOPROXY=http://goproxy.io | ||
export GO111MODULE=on | ||
build: | ||
${GOBUILD} -v -ldflags ${LDFLAGES} -o ${BINARY_NAME_SERVER} pkg/server/main.go | ||
${GOBUILD} -v -ldflags ${LDFLAGES} -o ${BINARY_NAME_AGENT} pkg/agent/main.go | ||
test: | ||
${GOTEST} -v ./... | ||
clean: | ||
${GOCLEAN} | ||
rm -f ${BINARY_NAME} | ||
rm -f ${BINARY_LINUX} | ||
run: | ||
${GOBUILD} -o ${BINARY_NAME} -v ./... | ||
./${BINARY_NAME} | ||
|
||
|
||
build-linux: | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 ${BUILDTOOL} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.