Skip to content

Commit

Permalink
[cherry-pick] Make chart registry configurable (#114) (#121)
Browse files Browse the repository at this point in the history
/cherry-pick

Signed-off-by: Tamal Saha <[email protected]>

Co-authored-by: Tamal Saha <[email protected]>
  • Loading branch information
1gtm and tamalsaha authored Jul 9, 2020
1 parent bf94d4d commit abd52d3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,10 @@ manifests: gen-crds patch-crds label-crds gen-bindata gen-values-schema gen-char
.PHONY: gen
gen: clientset gen-crd-protos manifests openapi

CHART_VERSION ?=
APP_VERSION ?= $(CHART_VERSION)
CHART_REGISTRY ?= appscode
CHART_REGISTRY_URL ?= https://charts.appscode.com/stable/
CHART_VERSION ?=
APP_VERSION ?= $(CHART_VERSION)

.PHONY: update-charts
update-charts: $(shell find $$(pwd)/charts -maxdepth 1 -mindepth 1 -type d -printf 'chart-%f ')
Expand All @@ -293,6 +295,8 @@ chart-%:
@$(MAKE) chart-contents-$* gen-chart-doc-$* --no-print-directory

chart-contents-%:
@yq w -i ./charts/$*/doc.yaml repository.name --tag '!!str' $(CHART_REGISTRY)
@yq w -i ./charts/$*/doc.yaml repository.url --tag '!!str' $(CHART_REGISTRY_URL)
@if [ ! -z "$(CHART_VERSION)" ]; then \
yq w -i ./charts/$*/Chart.yaml version --tag '!!str' $(CHART_VERSION); \
yq w -i ./charts/$*/doc.yaml chart.version --tag '!!str' $(CHART_VERSION); \
Expand Down

0 comments on commit abd52d3

Please sign in to comment.