diff --git a/Makefile b/Makefile index ea0f40c1b..38d6b4d0f 100644 --- a/Makefile +++ b/Makefile @@ -71,6 +71,19 @@ set-hmc-version: yq $(YQ) eval '.spec.version = "$(VERSION)"' -i $(PROVIDER_TEMPLATES_DIR)/hmc-templates/files/release.yaml $(YQ) eval '.metadata.name = "hmc-$(FQDN_VERSION)"' -i $(PROVIDER_TEMPLATES_DIR)/hmc-templates/files/release.yaml $(YQ) eval '.spec.hmc.template = "hmc-$(FQDN_VERSION)"' -i $(PROVIDER_TEMPLATES_DIR)/hmc-templates/files/release.yaml + @TEMPLATE_DIR=$(PROVIDER_TEMPLATES_DIR)/hmc-templates/files/templates/*; \ + cutversion=$$(echo $(VERSION) | sed "s/.*-//g"); \ + for template in $$TEMPLATE_DIR; do \ + if [ $$(yq eval '.kind' $$template) = 'ClusterTemplate' ]; then \ + echo $$template; \ + sed -i '' "s/chartVersion:.*[^$$cutversion].*/&-$$cutversion/g" "$$template"; \ + fi; \ + done; \ + CHART_DIR=$(TEMPLATES_DIR)/cluster/**/Chart.yaml; \ + for chart in $$CHART_DIR; do \ + echo $$chart; \ + sed -i '' "s/version:.*[^$$cutversion]*./&-$$cutversion/g" "$$chart"; \ + done .PHONY: hmc-chart-release hmc-chart-release: set-hmc-version templates-generate ## Generate hmc helm chart