forked from netsec-ethz/rains
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (41 loc) · 1.35 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
42
43
44
45
46
47
48
49
50
51
52
53
COMMIT=$(shell git rev-parse HEAD)
BRANCH=$(shell git rev-parse --abbrev-ref HEAD)
HOSTNAME=$(shell hostname -f)
BUILD_PATH=${PWD}/build/
LDFLAGS = -ldflags "-X main.buildinfo_hostname=${HOSTNAME} -X main.buildinfo_commit=${COMMIT} -X main.buildinfo_branch=${BRANCH}"
all: clean rainsd rainsd zonepub rdig zoneman keymanager
clean:
rm -rf ${BUILD_PATH}
mkdir ${BUILD_PATH}
rainsd:
cd ${BUILD_PATH}; \
go build ${LDFLAGS} -o rainsd github.com/netsec-ethz/rains/cmd/rainsd ; \
cd - >/dev/null
zonepub:
cd ${BUILD_PATH}; \
go build ${LDFLAGS} -o publisher github.com/netsec-ethz/rains/cmd/zonepub ; \
cd - >/dev/null
rdig:
cd ${BUILD_PATH}; \
go build ${LDFLAGS} -o rdig github.com/netsec-ethz/rains/cmd/rdig ; \
cd - >/dev/null
zoneman:
cd ${BUILD_PATH}; \
go build ${LDFLAGS} -o zoneman github.com/netsec-ethz/rains/cmd/zoneManager ;\
cd - >/dev/null
keymanager:
cd ${BUILD_PATH}; \
go build ${LDFLAGS} -o keymanager github.com/netsec-ethz/rains/cmd/keyManager ;\
cd - >/dev/null
tests:
go fmt ./...
go vet ./internal/...
go vet ./cmd/...
go vet ./test/...
go test ./internal/pkg/...
go test -v ./test/integration/
cover:
go test -coverprofile=coverage.out -coverpkg=./internal/pkg/... ./internal/pkg/... ./test/...
go tool cover -html=coverage.out -o coverage.html
firefox coverage.html
.PHONY: clean rainsd zonepub rdig zoneman keymanager