forked from piplabs/story
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (36 loc) · 1.99 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
help: ## Display this help message
@egrep -h '\s##\s' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m %-30s\033[0m %s\n", $$1, $$2}'
###############################################################################
### Contracts ###
###############################################################################
.PHONY: contracts-bindings
contract-bindings: ## Generate golang contract bindings.
make -C ./contracts bindings
###############################################################################
### Utils ###
###############################################################################
.PHONY: ensure-detect-secrets
ensure-detect-secrets: ## Checks if detect-secrets is installed.
@which detect-secrets > /dev/null || echo "detect-secrets not installed, see https://github.com/Yelp/detect-secrets?tab=readme-ov-file#installation"
.PHONY: install-pre-commit
install-pre-commit: ## Installs the pre-commit tool as the git pre-commit hook for this repo.
@which pre-commit > /dev/null || echo "pre-commit not installed, see https://pre-commit.com/#install"
@pre-commit install --install-hooks
.PHONY: install-go-tools
install-go-tools: ## Installs the go-dev-tools, like buf.
@go generate scripts/tools.go
.PHONY: lint
lint: ## Runs linters via pre-commit.
@pre-commit run -v --all-files
.PHONY: bufgen
bufgen: ## Generates protobufs using buf generate.
@./scripts/buf_generate.sh
.PHONY:
secrets-baseline: ensure-detect-secrets ## Update secrets baseline.
@detect-secrets scan --exclude-file pnpm-lock.yaml > .secrets.baseline
.PHONY: fix-golden
fix-golden: ## Fixes golden test fixtures.
@./scripts/fix_golden_tests.sh
###############################################################################
### Testing ###
###############################################################################