Skip to content

Commit

Permalink
Add commands to update chart version (#71)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Jun 22, 2020
1 parent bac456e commit 27604a5
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 8 deletions.
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
10 changes: 5 additions & 5 deletions charts/stash-postgres/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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: [email protected]
- name: appscode
email: [email protected]
4 changes: 2 additions & 2 deletions charts/stash-postgres/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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`
Expand Down
3 changes: 2 additions & 1 deletion charts/stash-postgres/doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
43 changes: 43 additions & 0 deletions lintconf.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 27604a5

Please sign in to comment.