-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
76 lines (54 loc) · 1.38 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
ifdef RACE
OPTS = -race -v
else
OPTS = -v
endif
all: clean vet test build
cleanall: clean dockerclean
ci: clean vet bench build
mod:
go mod tidy
vet:
go vet ./orion/... ./utils/...
lint:
golint ./orion/... ./utils/...
test:
go test -cover ./orion/... ./utils/...
build:
go build $(OPTS) ./orion/... ./utils/...
build-linux:
GOOS=linux GOARCH=amd64 go build $(OPTS) ./orion/...
bench:
go test -cover -race -coverprofile=coverage.txt -covermode=atomic --bench ./orion/... ./utils/... ./interceptors/...
benchmark: bench
clean:
go clean ./...
race:
RACE=true make all
doc:
godoc -http=:6060
list-updates:
go list -u -m all
update:
go get -u github.com/carousell/Orion/protoc-gen-orion
go get -u -m
go mod tidy
go mod vendor
run:
exec ./run.sh
dockerclean:
echo "remove exited containers"
docker ps --filter status=dead --filter status=exited -aq | xargs docker rm -v
docker images --no-trunc | grep "<none>" | awk '{print $3}' | xargs docker rmi
echo "^ above errors are ok"
install: macinstall goinstall
goinstall:
go get -u github.com/shurcooL/Go-Package-Store/cmd/Go-Package-Store
go get -u github.com/golang/lint/golint
go get -u google.golang.org/grpc
go get -u github.com/golang/protobuf/{proto,protoc-gen-go}
go get -u github.com/carousell/Orion/protoc-gen-orion
macinstall:
brew install protobuf
gen:
go generate ./orion ./utils ./interceptors ./example