-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (27 loc) · 1.07 KB
/
Copy pathMakefile
File metadata and controls
34 lines (27 loc) · 1.07 KB
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
.PHONY: gomods
gomods: ## Install gomods
go install github.com/jmank88/gomods@v0.1.6
.PHONY: tidy
tidy: gomods
gomods tidy
.PHONY: mockery
mockery: ## Install mockery.
go install github.com/vektra/mockery/v2@v2.53.3
.PHONY: codecgen
codecgen: ## Install codecgen
go install github.com/ugorji/go/codec/codecgen@v1.2.10
.PHONY: protoc
protoc: ## Install protoc
./tools/bin/install-protoc.sh 29.3 /
go install google.golang.org/protobuf/cmd/protoc-gen-go@`go list -m -json google.golang.org/protobuf | jq -r .Version`
.PHONY: generate
generate: gomods codecgen mockery protoc modgraph
export PATH="$(HOME)/.local/bin:$(PATH)"; gomods -s gethwrappers -go generate ./...
find . -type f -name .mockery.yaml -not -path "./contracts/" -not -path "./gethwrappers/" -execdir mockery \; ## Execute mockery for all .mockery.yaml files
.PHONY: rm-mocked
rm-mocked:
grep -rl "^// Code generated by mockery" | grep --exclude-dir ./contracts/ --exclude-dir ./gethwrappers/ .go$ | xargs -r rm
.PHONY: modgraph
modgraph: gomods
go install github.com/jmank88/modgraph@v0.1.0
./modgraph > go.md