forked from giantswarm/external-dns-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.gen.app.mk
45 lines (35 loc) · 1.52 KB
/
Makefile.gen.app.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
# DO NOT EDIT. Generated with:
#
#
##@ App
YQ=docker run --rm -u $$(id -u) -v $${PWD}:/workdir mikefarah/yq:4.29.2
HELM_DOCS=docker run --rm -u $$(id -u) -v $${PWD}:/helm-docs jnorwood/helm-docs:v1.11.0
ifdef APPLICATION
DEPS := $(shell ls $(APPLICATION)/charts)
endif
.PHONY: lint-chart check-env update-chart helm-docs update-deps $(DEPS)
lint-chart: IMAGE := giantswarm/helm-chart-testing:v3.0.0-rc.1
lint-chart: check-env ## Runs ct against the default chart.
@echo "====> $@"
rm -rf /tmp/$(APPLICATION)-test
mkdir -p /tmp/$(APPLICATION)-test/helm
cp -a ./helm/$(APPLICATION) /tmp/$(APPLICATION)-test/helm/
architect helm template --dir /tmp/$(APPLICATION)-test/helm/$(APPLICATION)
docker run -it --rm -v /tmp/$(APPLICATION)-test:/wd --workdir=/wd --name ct $(IMAGE) ct lint --validate-maintainers=false --charts="helm/$(APPLICATION)"
rm -rf /tmp/$(APPLICATION)-test
update-chart: check-env ## Sync chat with upstream repo.
@echo "====> $@"
vendir sync
$(MAKE) update-deps
update-deps: check-env $(DEPS) ## Update Helm dependencies.
cd $(APPLICATION) && helm dependency update
$(DEPS): check-env ## Update main Chart.yaml with new local dep versions.
new_version=`$(YQ) .version $(APPLICATION)/charts/$@/Chart.yaml` && \
$(YQ) -i e "with(.dependencies[]; select(.name == \"$@\") | .version = \"$$new_version\")" $(APPLICATION)/Chart.yaml
helm-docs: check-env ## Update $(APPLICATION) README.
$(HELM_DOCS) -c $(APPLICATION) -g $(APPLICATION)
check-env:
ifndef APPLICATION
$(error APPLICATION is not defined)
endif