-
-
Notifications
You must be signed in to change notification settings - Fork 215
/
Makefile
83 lines (71 loc) · 2.38 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
GO_FILES = $(shell find . '(' -path '*/.*' -o -path './vendor' ')' -prune -o -name '*.go' -print | cut -b3-)
GO_PATHS = $(shell go list -f '{{ .Dir }}' ./... | grep -E -v 'docs|cmd|mocks')
GO_EXAMPLES = $(shell go list -f '{{ .Dir }}' ./docs/assets/examples/...)
.PHONY: dod
dod: build test fmt lint
.PHONY: build
build:
go build $(GO_PATHS)
.PHONY: test
test:
go test $(GO_PATHS)
go test $(GO_EXAMPLES)
.PHONY: fmt
fmt:
gofmt -s -w ${GO_FILES}
gofumpt -l -w ${GO_FILES}
goimports -w ${GO_PATHS}
.PHONY: lint
lint:
golangci-lint run --config=.golangci.yml ./...
make mock-lint
.PHONY: mock-lint
mock-lint:
bash shell/mock-check.sh
.PHONY: install
install:
bash shell/install.sh
.PHONY: docs
docs:
docsify serve docs/
.PHONY: godoc
godoc:
godoc -http=127.0.0.1:6060
.PHONY: mocks
mocks:
rm -R mocks || true
mockery
make fmt
.PHONY: examples
examples:
go run docs/assets/examples/addpage/v2/main.go
go run docs/assets/examples/autorow/v2/main.go
go run docs/assets/examples/background/v2/main.go
go run docs/assets/examples/barcodegrid/v2/main.go
go run docs/assets/examples/billing/v2/main.go
go run docs/assets/examples/cellstyle/v2/main.go
go run docs/assets/examples/compression/v2/main.go
go run docs/assets/examples/customdimensions/v2/main.go
go run docs/assets/examples/customfont/v2/main.go
go run docs/assets/examples/custompage/v2/main.go
go run docs/assets/examples/datamatrixgrid/v2/main.go
go run docs/assets/examples/disablepagebreak/v2/main.go
go run docs/assets/examples/footer/v2/main.go
go run docs/assets/examples/header/v2/main.go
go run docs/assets/examples/imagegrid/v2/main.go
go run docs/assets/examples/line/v2/main.go
go run docs/assets/examples/list/v2/main.go
go run docs/assets/examples/lowmemory/v2/main.go
go run docs/assets/examples/margins/v2/main.go
go run docs/assets/examples/maxgridsum/v2/main.go
go run docs/assets/examples/mergepdf/v2/main.go
go run docs/assets/examples/metadatas/v2/main.go
go run docs/assets/examples/orientation/v2/main.go
go run docs/assets/examples/pagenumber/v2/main.go
go run docs/assets/examples/parallelism/v2/main.go
go run docs/assets/examples/protection/v2/main.go
go run docs/assets/examples/qrgrid/v2/main.go
go run docs/assets/examples/signaturegrid/v2/main.go
go run docs/assets/examples/simplest/v2/main.go
go run docs/assets/examples/textgrid/v2/main.go
go test docs/assets/examples/unittests/v2/main_test.go