-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
41 lines (34 loc) · 922 Bytes
/
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
# Go parameters
GOBUILD=go build
GOINSTALL=go install
GOCLEAN=go clean
GOTEST=go test
GOGET=go get
GOMOD=go mod
GODOC=godoc
.PHONY: all test coverage
all: test coverage examples
get:
$(GOGET) -t -v ./redisai/...
TLS_CERT ?= redis.crt
TLS_KEY ?= redis.key
TLS_CACERT ?= ca.crt
REDISAI_TEST_HOST ?= 127.0.0.1:6379
examples: get
@echo " "
@echo "Building the examples..."
$(GOBUILD) ./examples/redisai_pipelined_client/.
$(GOBUILD) ./examples/redisai_simple_client/.
$(GOBUILD) ./examples/redisai_tls_client/.
./redisai_tls_client --tls-cert-file $(TLS_CERT) \
--tls-key-file $(TLS_KEY) \
--tls-ca-cert-file $(TLS_CACERT) \
--host $(REDISAI_TEST_HOST)
test: get
$(GOTEST) -race -covermode=atomic ./...
coverage: get test
$(GOTEST) -race -coverprofile=coverage.txt -covermode=atomic ./redisai
godoc:
$(GOGET) -u golang.org/x/tools/...
echo "Open browser tab on localhost:6060"
$(GODOC)