aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/common
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/common')
-rw-r--r--kubernetes/common/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/kubernetes/common/Makefile b/kubernetes/common/Makefile
index 941c2f84df..eb782b4fd8 100644
--- a/kubernetes/common/Makefile
+++ b/kubernetes/common/Makefile
@@ -22,6 +22,8 @@ COMMON_CHARTS_DIR := common
EXCLUDES :=
HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
+HELM_VER != helm version --template "{{.Version}}"
+
.PHONY: $(EXCLUDES) $(HELM_CHARTS)
all: $(COMMON_CHARTS_DIR) $(HELM_CHARTS)
@@ -41,7 +43,11 @@ lint-%: dep-%
package-%: lint-%
@mkdir -p $(PACKAGE_DIR)
+ifeq "$(findstring v3,$(HELM_VER))" "v3"
+ @if [ -f $*/Chart.yaml ]; then PACKAGE_NAME=$$(helm package -d $(PACKAGE_DIR) $* | cut -d":" -f2) && helm push -f $$PACKAGE_NAME local; fi
+else
@if [ -f $*/Chart.yaml ]; then helm package -d $(PACKAGE_DIR) $*; fi
+endif
@helm repo index $(PACKAGE_DIR)
clean: