forked from vesoft-inc/nebula-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (23 loc) · 648 Bytes
/
Copy pathMakefile
File metadata and controls
34 lines (23 loc) · 648 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
.PHONY: build clean fmt test proto run examples test
DOCKER_REPO ?= docker.io/vesoft
IMAGE_TAG ?= latest
default: build
clean:
go mod tidy
fmt:
find . -type f -iname \*.go -exec go fmt {} \;
build: clean fmt
go build -trimpath -ldflags "-X main.GitInfoSHA=`git rev-parse --short HEAD`" -o ./bin/agent cmd/agent.go
go build -o ./bin/client examples/storage.go
chmod +x ./bin/agent
chmod +x ./bin/client
docker-build:
docker build -t "${DOCKER_REPO}/nebula-agent:${IMAGE_TAG}" .
docker-push:
docker push "${DOCKER_REPO}/nebula-agent:${IMAGE_TAG}"
proto:
bash scripts/gen_proto.sh
run: build
./bin/agent
test:
go test -v ./...