Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (33 loc) · 1.49 KB
/
Copy pathMakefile
File metadata and controls
41 lines (33 loc) · 1.49 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
35
36
37
38
39
40
41
.PHONY: modgraph
modgraph:
go install github.com/jmank88/gomods@v0.1.6
go install github.com/jmank88/modgraph@v0.1.4
./modgraph > go.md
.PHONY: gomods
gomods: ## Install gomods
go install github.com/jmank88/gomods@v0.1.6
.PHONY: gomodtidy
gomodtidy: gomods ## Run go mod tidy on all modules.
gomods tidy
.PHONY: tidy
tidy: gomodtidy gomods ## Tidy all modules and add to git.
git add '**go.*'
PROTOC_GEN_GO_VERSION := 1.36.10
.PHONY: protoc
protoc: ## Install protoc and protoc-gen-go
./script/install-protoc.sh 29.3
go install google.golang.org/protobuf/cmd/protoc-gen-go@v$(PROTOC_GEN_GO_VERSION)
MOCKERY_VERSION := 2.53.7
.PHONY: mockery
mockery: ## Install mockery at the version specified in .tool-versions
go install github.com/vektra/mockery/v2@v$(MOCKERY_VERSION)
.PHONY: generate
generate: protoc mockery gomods ## Execute all go:generate commands (including proto generation).
## Updating PATH makes sure that go:generate uses the version of protoc installed by the protoc make command.
export PATH="$(HOME)/.local/bin:$(PATH)"; gomods -w go generate -x ./...
.PHONY: update-chain-capabilities
update-chain-capabilities: ## Update a Go module in aptos/evm/solana/stellar. Usage: make update-chain-capabilities MODULE=<module> REF=<branch-or-commit>
./script/update-chain-capabilities.sh "$(MODULE)" "$(REF)"
.PHONY: help
help: ## Display this help screen.
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'