Skip to content

Commit d4370c9

Browse files
committed
Add commands to update chart version (#45)
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent 38fb308 commit d4370c9

File tree

5 files changed

+73
-10
lines changed

5 files changed

+73
-10
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-mysql/Chart.yaml

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

charts/stash-mysql/README.md

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

1313
## Introduction
1414

15-
This chart deploys necessary `Function` and `Task` definition to backup or restore MySQL database 5.7.25 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 MySQL 5.7.25 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-mysql-5.7.25`:
2626
$ helm install stash-mysql-5.7.25 appscode/stash-mysql -n kube-system --version=5.7.25
2727
```
2828

29-
The command deploys necessary `Function` and `Task` definition to backup or restore MySQL database 5.7.25 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 MySQL 5.7.25 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-mysql/doc.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ project:
33
shortName: stash-mysql
44
url: https://github.com/stashed/mysql
55
description: "MySQL database backup/restore plugin for [Stash by AppsCode](https://stash.run)"
6-
app: "necessary `Function` and `Task` definition to backup or restore MySQL database 5.7.25 using Stash"
6+
app: "necessary `Function` and `Task` definition to backup or restore MySQL 5.7.25
7+
using Stash"
78
repository:
89
url: https://charts.appscode.com/stable/
910
name: appscode
1011
chart:
1112
name: stash-mysql
12-
version: "5.7.25"
13+
version: 5.7.25
1314
values: "-- generate from values file --"
1415
valuesExample: "-- generate from values file --"
1516
prerequisites:

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)