-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
55 lines (44 loc) · 1.17 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
PROJECT_ROOT := $(shell git rev-parse --show-toplevel)
.DEFAULT_GOAL: help
help:
@echo "Usage: $(MAKE) <target>"
@echo
@echo " * 'all' - Run everything"
@echo " * 'fmt' - Run formatters"
@echo " * 'lint' - Run linters"
@echo " * 'test' - Run unit tests"
@echo " * 'clean' - Remove generated build files"
.PHONY: help
all: lint fmt test
.PHONY: all
lint: lint/helm lint/kubernetes lint/shellcheck
.PHONY: lint
lint/helm:
@echo "--- Running helm lint"
helm lint --strict .
.PHONY: lint/helm
lint/kubernetes:
@echo "--- Linting rendered templates"
./scripts/test_helm.sh
.PHONY: lint/kubernetes
lint/shellcheck: $(shell scripts/depfind/sh.sh)
@echo "--- Running shellcheck"
shellcheck $^
.PHONY: lint/shellcheck
# TODO(jawnsy): this will be modified to format using Prettier
fmt: README.md
.PHONY: fmt
README.md: README.md.gotmpl values.yaml
@echo "--- Generating documentation"
helm-docs --template-files=$<
@printf "<!-- DO NOT EDIT. THIS IS GENERATED FROM README.md.gotmpl -->\n\n%s\n" "$$(cat README.md)" > README.md
.PHONY: README.md
test: test/go
.PHONY: test
test/go:
@echo "--- Running tests"
./scripts/test_go.sh
.PHONY: test/go
clean:
rm -vrf build/
.PHONY: clean