From 27604a58c28a71c9b1591c0d417f388bb8e71751 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Mon, 22 Jun 2020 00:50:53 -0700 Subject: [PATCH] Add commands to update chart version (#71) Signed-off-by: Tamal Saha --- Makefile | 19 ++++++++++++++ charts/stash-postgres/Chart.yaml | 10 ++++---- charts/stash-postgres/README.md | 4 +-- charts/stash-postgres/doc.yaml | 3 ++- lintconf.yaml | 43 ++++++++++++++++++++++++++++++++ 5 files changed, 71 insertions(+), 8 deletions(-) create mode 100644 lintconf.yaml diff --git a/Makefile b/Makefile index 2b6c19b18..34ae34da9 100644 --- a/Makefile +++ b/Makefile @@ -284,6 +284,25 @@ 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) + +.PHONY: update-charts +update-charts: $(shell find $$(pwd)/charts -maxdepth 1 -mindepth 1 -type d -printf 'chart-%f ') + +chart-%: + @$(MAKE) chart-contents-$* gen-chart-doc-$* --no-print-directory + +chart-contents-%: + @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); \ + yq w -i ./charts/$*/doc.yaml release.name --tag '!!str' $(BIN)-$(CHART_VERSION); \ + fi + @if [ ! -z "$(APP_VERSION)" ]; then \ + yq w -i ./charts/$*/Chart.yaml appVersion --tag '!!str' $(APP_VERSION); \ + fi + fmt: $(BUILD_DIRS) @docker run \ -i \ diff --git a/charts/stash-postgres/Chart.yaml b/charts/stash-postgres/Chart.yaml index 0cdef2021..77ef5c220 100644 --- a/charts/stash-postgres/Chart.yaml +++ b/charts/stash-postgres/Chart.yaml @@ -1,12 +1,12 @@ apiVersion: v1 -description: 'stash-postgres - PostgreSQL database backup and restore plugin for Stash by AppsCode' +description: 'stash-postgres - PostgreSQL database plugin for Stash by AppsCode' name: stash-postgres version: "10.2" appVersion: "10.2" -home: https://github.com/stashed/postgres +home: https://stash.run icon: https://cdn.appscode.com/images/icon/stash.png sources: - - https://github.com/stashed/postgres +- https://github.com/stashed/postgres maintainers: - - name: appscode - email: support@appscode.com +- name: appscode + email: support@appscode.com diff --git a/charts/stash-postgres/README.md b/charts/stash-postgres/README.md index c32b0a325..207c970b2 100644 --- a/charts/stash-postgres/README.md +++ b/charts/stash-postgres/README.md @@ -12,7 +12,7 @@ $ helm install stash-postgres-10.2 appscode/stash-postgres -n kube-system --vers ## Introduction -This chart deploys necessary `Function` and `Task` definition to backup or restore PostgreSQL database 10.2 using Stash on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. +This chart deploys necessary `Function` and `Task` definition to backup or restore PostgreSQL 10.2 using Stash on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. ## Prerequisites @@ -26,7 +26,7 @@ To install the chart with the release name `stash-postgres-10.2`: $ helm install stash-postgres-10.2 appscode/stash-postgres -n kube-system --version=10.2 ``` -The command deploys necessary `Function` and `Task` definition to backup or restore PostgreSQL database 10.2 using Stash on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. +The command deploys necessary `Function` and `Task` definition to backup or restore PostgreSQL 10.2 using Stash on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. > **Tip**: List all releases using `helm list` diff --git a/charts/stash-postgres/doc.yaml b/charts/stash-postgres/doc.yaml index cd3652c50..00b9b7d6d 100644 --- a/charts/stash-postgres/doc.yaml +++ b/charts/stash-postgres/doc.yaml @@ -3,7 +3,8 @@ project: shortName: stash-postgres url: https://github.com/stashed/postgres description: "PostgreSQL database backup/restore plugin for [Stash by AppsCode](https://stash.run)" - app: "necessary `Function` and `Task` definition to backup or restore PostgreSQL database 10.2 using Stash" + app: "necessary `Function` and `Task` definition to backup or restore PostgreSQL + 10.2 using Stash" repository: url: https://charts.appscode.com/stable/ name: appscode diff --git a/lintconf.yaml b/lintconf.yaml new file mode 100644 index 000000000..860d7cb98 --- /dev/null +++ b/lintconf.yaml @@ -0,0 +1,43 @@ +# adapted from: https://github.com/helm/chart-testing/raw/master/etc/lintconf.yaml +--- +rules: + braces: + min-spaces-inside: 0 + max-spaces-inside: 0 + min-spaces-inside-empty: -1 + max-spaces-inside-empty: -1 + brackets: + min-spaces-inside: 0 + max-spaces-inside: 0 + min-spaces-inside-empty: -1 + max-spaces-inside-empty: -1 + colons: + max-spaces-before: 0 + max-spaces-after: 1 + commas: + max-spaces-before: 0 + min-spaces-after: 1 + max-spaces-after: 1 + comments: + require-starting-space: true + min-spaces-from-content: 1 + document-end: disable + document-start: disable # No --- to start a file + empty-lines: + max: 2 + max-start: 0 + max-end: 0 + hyphens: + max-spaces-after: 1 + indentation: + spaces: consistent + indent-sequences: whatever # - list indentation will handle both indentation and without + check-multi-line-strings: false + key-duplicates: enable + line-length: disable # Lines can be any length + new-line-at-end-of-file: enable + new-lines: + type: unix + trailing-spaces: enable + truthy: + level: warning