-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
64 lines (48 loc) · 1.42 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
64
#!make
help: ## Display this help screen
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
sed -E 's/:.+## /@/g' | \
LC_ALL=C sort -t@ -k1,1 | \
column -s@ -t
bash-all: bash-fmt bash-check bash-lint ## Run all bash tests
bash-check: ## Check format bash code
@find . -type f -name "*.sh" -not -path "./target/*" | xargs shfmt -i 2 -d
bash-deps: ## Install bash dependencies
@sudo apt-get install -y moreutils
bash-fmt: ## Format bash code
@find . -type f -name "*.sh" -not -path "./target/*" | xargs shfmt -i 2 -w
bash-lint: ## Check lint bash code
@find . -type f -name "*.sh" -not -path "./target/*" | xargs shellcheck -o all
doc-changelog: ## Write CHANGELOG.md
@git cliff -o CHANGELOG.md
doc-readme: ## Write README.md
@./dev/doc-readme.sh
dprint-check: ## Dprint check
@dprint check
dprint-fmt: ## Dprint format
@dprint fmt
lua-check: ## Check format lua code
@find . -name "*.lua" | xargs stylua -c
lua-fmt: ## Format Lua code
@find . -name "*.lua" | xargs stylua
makefile-descriptions: ## Check if all Makefile rules have descriptions
@./dev/makefile-descriptions.sh
typos: ## Check typos
@typos
typos-fix: ## Fix typos
@typos -w
.PHONY: bash-all
.PHONY: bash-check
.PHONY: bash-deps
.PHONY: bash-fmt
.PHONY: bash-lint
.PHONY: doc-changelog
.PHONY: doc-readme
.PHONY: dprint-check
.PHONY: dprint-fmt
.PHONY: help
.PHONY: lua-check
.PHONY: lua-fmt
.PHONY: makefile-descriptions
.PHONY: typos
.PHONY: typos-fix