-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (31 loc) · 863 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
35
36
37
38
39
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -euc
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
SH := $(wildcard .github/workflows/*.sh)
YML_WORKFLOWS := $(wildcard .github/workflows/*.yml)
YML_CONFIGS := $(wildcard .*.yml)
MD := $(wildcard .github/ISSUE_TEMPLATE/*.md .github/*.md *.md LICENSE)
ACTIONLINT := actionlint
SHELLCHECK_OPTS="-o all"
all: $(SH) $(YML_WORKFLOWS) $(YML_CONFIGS) $(MD) $(ACTIONLINT)
.PHONY: all
$(SH):
shfmt -i 4 -w $@
SHELLCHECK_OPTS=$(SHELLCHECK_OPTS) shellcheck $@
.PHONY: $(SH)
$(YML_WORKFLOWS):
yamllint -s -c .yamllint.yml $@
SHELLCHECK_OPTS=$(SHELLCHECK_OPTS) actionlint $@
.PHONY: $(YML_WORKFLOWS)
$(YML_CONFIGS):
yamllint -s -c .yamllint.yml $@
.PHONY: $(YML_CONFIGS)
$(MD):
markdownlint -c .markdownlint.yml $@
.PHONY: $(MD)
$(ACTIONLINT):
actionlint
.PHONY: $(ACTIONLINT)