-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
41 lines (30 loc) · 1.3 KB
/
Makefile
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
35
36
37
38
39
40
41
export CGO_ENABLED=0
export GO111MODULE=on
.PHONY: build
ATOMIX_RAFT_NODE_VERSION := latest
all: build
build: # @HELP build the source code
build:
GOOS=linux GOARCH=amd64 go build -o build/_output/atomix-raft-node ./cmd/atomix-raft-node
test: # @HELP run the unit tests and source code validation
test: build license_check linters
go test github.com/atomix/raft-replica/...
coverage: # @HELP generate unit test coverage data
coverage: build linters license_check
go test github.com/atomix/raft-replica/pkg/... -coverprofile=coverage.out.tmp -covermode=count
@cat coverage.out.tmp | grep -v ".pb.go" > coverage.out
linters: # @HELP examines Go source code and reports coding problems
golangci-lint run
license_check: # @HELP examine and ensure license headers exist
./build/licensing/boilerplate.py -v
proto: # @HELP build Protobuf/gRPC generated types
proto:
docker run -it -v `pwd`:/go/src/github.com/atomix/raft-replica \
-w /go/src/github.com/atomix/raft-replica \
--entrypoint build/bin/compile_protos.sh \
onosproject/protoc-go:stable
image: # @HELP build atomix-raft-node Docker image
image: build
docker build . -f build/docker/Dockerfile -t atomix/raft-replica:${ATOMIX_RAFT_NODE_VERSION}
push: # @HELP push atomix-raft-node Docker image
docker push atomix/raft-replica:${ATOMIX_RAFT_NODE_VERSION}