-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
58 lines (40 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
## simple makefile to log workflow
.PHONY: all test clean build install protobuf examples
SHELL := /bin/bash
VERSION ?= development
GOFLAGS ?= $(GOFLAGS:) -ldflags "-X 'github.com/iris-connect/eps.Version=$(VERSION)'"
export EPS_TEST = yes
EPS_TEST_SETTINGS ?= "$(shell pwd)/settings/test"
all: dep install
build:
go build $(GOFLAGS) ./...
dep:
@go get ./...
install: build
go install $(GOFLAGS) ./...
test:
EPS_SETTINGS=$(EPS_TEST_SETTINGS) go test $(testargs) `go list ./...`
test-races:
EPS_SETTINGS=$(EPS_TEST_SETTINGS) go test -race $(testargs) `go list ./...`
bench:
EPS_SETTINGS=$(EPS_TEST_SETTINGS) go test -run=NONE -bench=. $(GOFLAGS) `go list ./... | grep -v api/`
clean:
@go clean $(GOFLAGS) -i ./...
copyright:
python .scripts/make_copyright_headers.py
protobuf:
protoc --go_out=. --go_opt=paths=source_relative \
--go-grpc_out=. --go-grpc_opt=paths=source_relative \
protobuf/eps.proto
certs:
rm -rf settings/dev/certs/*
rm -rf settings/test/certs/*
(cd settings/dev/certs; ../../../.scripts/make_certs.sh)
(cd settings/test/certs; ../../../.scripts/make_certs.sh)
sd-setup:
.scripts/sd_setup.sh settings/dev/directory
sd-test-setup:
.scripts/sd_setup.sh settings/test/directory
examples:
@go build $(GOFLAGS) -tags examples ./...
@go install $(GOFLAGS) -tags examples ./...