-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
executable file
·37 lines (32 loc) · 1.11 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
# ==================================================================================== #
# HELPERS
# ==================================================================================== #
## help: print this help message
.PHONY: help
help:
@echo 'Usage:'
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'
## charttesting: Run Helm chart unit tests
.PHONY: charttesting
charttesting:
@set -e; \
for dir in charts/steadybit-shopping-demo; do \
echo "Unit Testing $$dir"; \
helm unittest $$dir; \
done
## chartlint: Lint charts
.PHONY: chartlint
chartlint:
ct lint --config chartTesting.yaml
## chart-bump-version: Bump the patch version and optionally set the appVersion
.PHONY: chart-bump-version
chart-bump-version:
@set -e; \
for dir in charts/steadybit-shopping-demo; do \
if [ ! -z "$(APP_VERSION)" ]; then \
yq -i ".appVersion = strenv(APP_VERSION)" $$dir/Chart.yaml; \
fi; \
CHART_VERSION=$$(semver -i patch $$(yq '.version' $$dir/Chart.yaml)) \
yq -i ".version = strenv(CHART_VERSION)" $$dir/Chart.yaml; \
grep -e "^version:" -e "^appVersion:" $$dir/Chart.yaml; \
done