-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
40 lines (31 loc) · 1006 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
PROGRAM=exchange
BIN=bin/exchange
CLIENTBIN=bin/client
VERSION=`bash version.sh`
SOURCEDIR=src/github.com/z0rr0/exchange
CONTAINER=container.sh
all: test clients
install:
go install -ldflags "$(VERSION)" github.com/z0rr0/exchange
run: install
cp config.example.json config.json
$(GOPATH)/$(BIN)
lint: install
go vet github.com/z0rr0/exchange/rates
golint github.com/z0rr0/exchange/rates
go vet github.com/z0rr0/exchange
golint github.com/z0rr0/exchange
test: lint
# go tool cover -html=ratest_coverage.out
# go tool trace ratest.test ratest_trace.out
go test -race -v -cover -coverprofile=ratest_coverage.out -trace ratest_trace.out github.com/z0rr0/exchange/rates
clients:
go vet github.com/z0rr0/exchange/client
golint github.com/z0rr0/exchange/client
go install -ldflags "$(VERSION)" github.com/z0rr0/exchange/client
docker: lint
bash $(CONTAINER)
docker build -t $(PROGRAM) .
clean:
rm -f $(PROGRAM) $(GOPATH)/$(BIN) $(GOPATH)/$(CLIENTBIN)
rm -rf $(GOPATH)/$(SOURCEDIR)/*.out