forked from sbezverk/gobmp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (41 loc) · 1.32 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
REGISTRY_NAME?=docker.io/sbezverk
IMAGE_VERSION?=0.0.0
.PHONY: all gobmp player container push clean test lint
ifdef V
TESTARGS = -v -args -alsologtostderr -v 5
else
TESTARGS =
endif
all: gobmp validator
gobmp:
mkdir -p bin
$(MAKE) -C ./cmd/gobmp compile-gobmp
player:
mkdir -p bin
$(MAKE) -C ./cmd/player compile-player
validator:
mkdir -p bin
$(MAKE) -C ./cmd/validator compile-validator
validator-mac:
mkdir -p bin
$(MAKE) -C ./cmd/validator compile-validator-mac
container: gobmp
docker build -t $(REGISTRY_NAME)/gobmp:$(IMAGE_VERSION) -f ./build/Dockerfile.gobmp .
player-container: player
docker build -t $(REGISTRY_NAME)/gobmp-player:$(IMAGE_VERSION) -f ./build/Dockerfile.player .
validator-container: validator
docker build -t $(REGISTRY_NAME)/gobmp-validator:$(IMAGE_VERSION) -f ./build/Dockerfile.validator .
push: container
docker push $(REGISTRY_NAME)/gobmp:$(IMAGE_VERSION)
player-push: player-container
docker push $(REGISTRY_NAME)/gobmp-player:$(IMAGE_VERSION)
validator-push: validator-container
docker push $(REGISTRY_NAME)/gobmp-validator:$(IMAGE_VERSION)
clean:
rm -rf bin
lint:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
golangci-lint run
test:
GO111MODULE=on go test `go list ./... | grep -v 'vendor'` $(TESTARGS)
GO111MODULE=on go vet `go list ./... | grep -v vendor`