forked from sbezverk/gobmp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (28 loc) · 856 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
REGISTRY_NAME?=docker.io/sbezverk
IMAGE_VERSION?=0.0.0
.PHONY: all gobmp player container push clean test
ifdef V
TESTARGS = -v -args -alsologtostderr -v 5
else
TESTARGS =
endif
all: gobmp
gobmp:
mkdir -p bin
$(MAKE) -C ./cmd/gobmp compile-gobmp
player:
mkdir -p bin
$(MAKE) -C ./cmd/player compile-player
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 .
push: container
docker push $(REGISTRY_NAME)/gobmp:$(IMAGE_VERSION)
player-push: player-container
docker push $(REGISTRY_NAME)/gobmp-player:$(IMAGE_VERSION)
clean:
rm -rf bin
test:
GO111MODULE=on go test `go list ./... | grep -v 'vendor'` $(TESTARGS)
GO111MODULE=on go vet `go list ./... | grep -v vendor`