-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (26 loc) · 1016 Bytes
/
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
.DEFAULT_GOAL := help
UNAME_S := $(shell uname -s 2>/dev/null || echo "unknown")
UNAME_S_LOWERCASE := $(shell echo $(UNAME_S) | tr A-Z a-z)
.PHONY: help
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
.PHONY: lint
lint: ## Lint the Go code using golangci-lint
golangci-lint run --skip-dirs externals,examples
.PHONY: test
test: ## Run tests
go test -v -cover ./... -coverprofile cover.out
cover-report: test
go tool cover -func cover.out
.PHONY: generate
generate: submodules ## Run tests
go generate ./...
.PHONY: benchmark
benchmark: ## Run benchmarks
go test -v -bench . -benchmem ./... > benchmark.txt
.PHONY: prepare
prepare: ## Ensure releases binaries are executable
chmod +x ./releases/solc-*
.PHONY: submodules
submodules: ## Update submodules
git submodule update --init --recursive