-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile.devel.mk
76 lines (72 loc) · 1.4 KB
/
Makefile.devel.mk
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
65
66
67
68
69
70
71
72
73
74
75
76
##@ Development
define HELP_INIT
# Init Helm by adding the stable repository.
#
# The stable repository is no longer added by default.
# Refs:
# - https://helm.sh/blog/helm-v3-beta/#notable-changes-since-helm-v2
# - https://helm.sh/docs/intro/quickstart/#initialize-a-helm-chart-repository
#
# Example:
# make init
endef
.PHONY: init
ifeq ($(HELP),y)
init:
$(Q) echo "$$HELP_INIT"
else
init: ## Init Helm
$(Q) $(HELM) repo add stable $(HELM_REPO_STABLE_URL)
$(Q) $(HELM) repo add incubator $(HELM_REPO_INCUBATOR_URL)
endif
define HELP_DEP
# Rebuild charts dependencies.
#
# Example:
# make dep
endef
.PHONY: dep
ifeq ($(HELP),y)
dep:
$(Q) echo "$$HELP_DEP"
else
dep: init ## Rebuild charts dependencies
$(Q) find $(CHARTS_DIR) \
-mindepth 1 \
-maxdepth 1 \
-type d \
-exec $(HELM) dep update {} \; \
-exec $(HELM) dep build {} \;
endif
define HELP_LINT
# Examine charts for possible issues.
#
# Example:
# make lint
endef
.PHONY: lint
ifeq ($(HELP),y)
lint:
$(Q) echo "$$HELP_LINT"
else
lint: ## Lint charts
$(Q) find $(CHARTS_DIR) \
-mindepth 1 \
-maxdepth 1 \
-type d \
-exec $(HELM) lint {} \;
endif
define HELP_DOCS
# Generates documentation for the charts.
#
# Example:
# make docs
endef
.PHONY: docs
ifeq ($(HELP),y)
docs:
$(Q) echo "$$HELP_DOCS"
else
docs: ## Document the charts
@docker run --rm --volume "$(shell pwd):/helm-docs" -u $(shell id -u) jnorwood/helm-docs:v1.13.1
endif