summaryrefslogtreecommitdiffstats
path: root/kubernetes/sdc/components/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/sdc/components/Makefile')
-rw-r--r--kubernetes/sdc/components/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/kubernetes/sdc/components/Makefile b/kubernetes/sdc/components/Makefile
index 8d3bf2be4f..0d5b9e0c1f 100644
--- a/kubernetes/sdc/components/Makefile
+++ b/kubernetes/sdc/components/Makefile
@@ -19,6 +19,7 @@ SECRET_DIR := $(OUTPUT_DIR)/secrets
EXCLUDES :=
HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
+HELM_VER := $(shell helm version --template "{{.Version}}")
.PHONY: $(EXCLUDES) $(HELM_CHARTS)
@@ -39,7 +40,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: