-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (26 loc) · 755 Bytes
/
Copy pathMakefile
File metadata and controls
36 lines (26 loc) · 755 Bytes
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
.PHONY: all
all: test binaries
gobin:
mkdir $@
gobin/mimage: gobin
go build -mod vendor -o $@ ./cmd/mimage
.PHONY: binaries
binaries: gobin/mimage
.PHONY: test
test:
go test -mod vendor ./...
.PHONY: testcover
testcover:
go test -mod vendor -race -coverprofile=coverage.txt -covermode=atomic ./...
GO_EXCLUDE := /vendor/
GO_FILES_CMD := find . -name '*.go' | grep -v -E '$(GO_EXCLUDE)'
.PHONY: format
format: $(goimports); $(info $(H) formatting files with goimports...)
goimports -w -local bitbucket.org/dnovikoff/go-mahjong/mimage $$($(GO_FILES_CMD))
gofmt -w -s $$($(GO_FILES_CMD))
docker:
mkdir $@
docker/image: docker Dockerfile
docker build . -t tempai/mimage > $@
docker/push: docker docker/image
docker push tempai/mimage > $@