Skip to content

Commit 744209f

Browse files
authored
Ensure using helm v2 (#432)
1 parent 24fb0c7 commit 744209f

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Makefile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ CHART_NAME := $(if $(CHART_NAME),$(CHART_NAME),chart-name)
1717

1818
.PHONY: stable
1919
stable: WORKDIR = stable
20-
stable: repo-helm update-req package-all index
20+
stable: check-helm repo-helm update-req package-all index
2121
@echo "Done"
2222

2323
.PHONY: stable-specific
2424
stable-specific: WORKDIR = stable
25-
stable-specific: repo-helm update-req-specific package-specific index
25+
stable-specific: check-helm repo-helm update-req-specific package-specific index
2626
@echo "Done"
2727

2828
.PHONY: demo
@@ -51,7 +51,7 @@ cleanup-tmp-workspace:
5151
@echo "Cleaned up /tmp/v3io-helm-charts"
5252

5353
.PHONY: helm-publish
54-
helm-publish: cleanup-tmp-workspace
54+
helm-publish: check-helm cleanup-tmp-workspace
5555
helm-publish:
5656
@echo "Preparing to release a new index from $(GITHUB_BRANCH)"
5757
@git clone [email protected]:v3io/helm-charts /tmp/v3io-helm-charts
@@ -116,7 +116,7 @@ helm-publish-incubator-specific:
116116
helm-publish-incubator-specific: cleanup-tmp-workspace
117117

118118
.PHONY: helm-publish-stable-specific
119-
helm-publish-stable-specific: cleanup-tmp-workspace
119+
helm-publish-stable-specific: check-helm cleanup-tmp-workspace
120120
helm-publish-stable-specific:
121121
@echo "Preparing to release a new stable index for $(CHART_NAME) from $(GITHUB_BRANCH)"
122122
@git clone [email protected]:v3io/helm-charts /tmp/v3io-helm-charts
@@ -221,4 +221,9 @@ check-helm:
221221
echo "Missing helm command" ; \
222222
exit 2 ; \
223223
fi
224+
@HELM_VERSION=$$($(HELM) version --short --client) && \
225+
if [[ "$$HELM_VERSION" != *"v2"* ]]; then \
226+
echo "Helm version must be 2" ; \
227+
exit 2 ; \
228+
fi
224229
@echo "Helm command exists"

0 commit comments

Comments
 (0)