Skip to content

Commit 8ae0673

Browse files
committed
Add commands to update chart version (#71)
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent 44bf83d commit 8ae0673

File tree

5 files changed

+71
-8
lines changed

5 files changed

+71
-8
lines changed

Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,25 @@ manifests: gen-crds patch-crds label-crds gen-bindata gen-values-schema gen-char
284284
.PHONY: gen
285285
gen: clientset gen-crd-protos manifests openapi
286286

287+
CHART_VERSION ?=
288+
APP_VERSION ?= $(CHART_VERSION)
289+
290+
.PHONY: update-charts
291+
update-charts: $(shell find $$(pwd)/charts -maxdepth 1 -mindepth 1 -type d -printf 'chart-%f ')
292+
293+
chart-%:
294+
@$(MAKE) chart-contents-$* gen-chart-doc-$* --no-print-directory
295+
296+
chart-contents-%:
297+
@if [ ! -z "$(CHART_VERSION)" ]; then \
298+
yq w -i ./charts/$*/Chart.yaml version --tag '!!str' $(CHART_VERSION); \
299+
yq w -i ./charts/$*/doc.yaml chart.version --tag '!!str' $(CHART_VERSION); \
300+
yq w -i ./charts/$*/doc.yaml release.name --tag '!!str' $(BIN)-$(CHART_VERSION); \
301+
fi
302+
@if [ ! -z "$(APP_VERSION)" ]; then \
303+
yq w -i ./charts/$*/Chart.yaml appVersion --tag '!!str' $(APP_VERSION); \
304+
fi
305+
287306
fmt: $(BUILD_DIRS)
288307
@docker run \
289308
-i \

charts/stash-postgres/Chart.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
apiVersion: v1
2-
description: 'stash-postgres - PostgreSQL database backup and restore plugin for Stash by AppsCode'
2+
description: 'stash-postgres - PostgreSQL database plugin for Stash by AppsCode'
33
name: stash-postgres
44
version: "10.6"
55
appVersion: "10.6"
6-
home: https://github.com/stashed/postgres
6+
home: https://stash.run
77
icon: https://cdn.appscode.com/images/icon/stash.png
88
sources:
9-
- https://github.com/stashed/postgres
9+
- https://github.com/stashed/postgres
1010
maintainers:
11-
- name: appscode
12-
email: support@appscode.com
11+
- name: appscode
12+
email: support@appscode.com

charts/stash-postgres/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ $ helm install stash-postgres-10.6 appscode/stash-postgres -n kube-system --vers
1212

1313
## Introduction
1414

15-
This chart deploys necessary `Function` and `Task` definition to backup or restore PostgreSQL database 10.6 using Stash on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
15+
This chart deploys necessary `Function` and `Task` definition to backup or restore PostgreSQL 10.6 using Stash on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
1616

1717
## Prerequisites
1818

@@ -26,7 +26,7 @@ To install the chart with the release name `stash-postgres-10.6`:
2626
$ helm install stash-postgres-10.6 appscode/stash-postgres -n kube-system --version=10.6
2727
```
2828

29-
The command deploys necessary `Function` and `Task` definition to backup or restore PostgreSQL database 10.6 using Stash on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
29+
The command deploys necessary `Function` and `Task` definition to backup or restore PostgreSQL 10.6 using Stash on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
3030

3131
> **Tip**: List all releases using `helm list`
3232

charts/stash-postgres/doc.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ project:
33
shortName: stash-postgres
44
url: https://github.com/stashed/postgres
55
description: "PostgreSQL database backup/restore plugin for [Stash by AppsCode](https://stash.run)"
6-
app: "necessary `Function` and `Task` definition to backup or restore PostgreSQL database 10.6 using Stash"
6+
app: "necessary `Function` and `Task` definition to backup or restore PostgreSQL
7+
10.6 using Stash"
78
repository:
89
url: https://charts.appscode.com/stable/
910
name: appscode

lintconf.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# adapted from: https://github.com/helm/chart-testing/raw/master/etc/lintconf.yaml
2+
---
3+
rules:
4+
braces:
5+
min-spaces-inside: 0
6+
max-spaces-inside: 0
7+
min-spaces-inside-empty: -1
8+
max-spaces-inside-empty: -1
9+
brackets:
10+
min-spaces-inside: 0
11+
max-spaces-inside: 0
12+
min-spaces-inside-empty: -1
13+
max-spaces-inside-empty: -1
14+
colons:
15+
max-spaces-before: 0
16+
max-spaces-after: 1
17+
commas:
18+
max-spaces-before: 0
19+
min-spaces-after: 1
20+
max-spaces-after: 1
21+
comments:
22+
require-starting-space: true
23+
min-spaces-from-content: 1
24+
document-end: disable
25+
document-start: disable # No --- to start a file
26+
empty-lines:
27+
max: 2
28+
max-start: 0
29+
max-end: 0
30+
hyphens:
31+
max-spaces-after: 1
32+
indentation:
33+
spaces: consistent
34+
indent-sequences: whatever # - list indentation will handle both indentation and without
35+
check-multi-line-strings: false
36+
key-duplicates: enable
37+
line-length: disable # Lines can be any length
38+
new-line-at-end-of-file: enable
39+
new-lines:
40+
type: unix
41+
trailing-spaces: enable
42+
truthy:
43+
level: warning

0 commit comments

Comments
 (0)