-
Notifications
You must be signed in to change notification settings - Fork 19
/
Makefile
63 lines (53 loc) · 1.15 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
.PHONY: test
test: gen
@echo
@echo " (x x) < memefish: test"
@echo " /|||\\"
@echo
@echo go test ./...
@go test -cover \
-coverprofile=cover.out \
-covermode=count \
-coverpkg=github.com/cloudspannerecosystem/memefish/... \
./...
@echo go build ./examples/... ./tools/...
@go build -o /dev/null ./examples/... ./tools/...
.PHONY: lint
lint: gen bin/golangci-lint
@echo
@echo " (x x) < memefish: lint"
@echo " /|||\\"
@echo
bin/golangci-lint run ./...
.PHONY: gen
gen:
@echo
@echo " (x x) < memefish: gen"
@echo " /|||\\"
@echo
go generate ./...
.PHONY: check-gen
check-gen: gen
git diff --exit-code
.PHONY: docs
docs:
@echo
@echo " (x x) < memefish: docs"
@echo " /|||\\"
@echo
cd docs && hugo mod get -u && hugo
.PHONY: ci
ci: check-gen lint test
.PHONY: fmt
fmt: gen
go fmt ./...
.PHONY: update-result
update-result:
go test -v ./parser_test.go -update
.PHONY: update-mod
update-mod:
go mod tidy
.PHONY: install-dep
install-dep: bin/golangci-lint
bin/golangci-lint:
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(CURDIR)/bin v1.62.2