Skip to content

Commit

Permalink
Add commands to update chart version (#65)
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 46d5d4c commit 84c004f
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 10 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
12 changes: 6 additions & 6 deletions charts/stash-mongodb/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apiVersion: v1
description: 'stash-mongodb - MongoDB database backup and restore plugin for Stash by AppsCode'
description: 'stash-mongodb - MongoDB database plugin for Stash by AppsCode'
name: stash-mongodb
version: "4.0.5"
appVersion: "4.0.5"
version: 4.0.5
appVersion: 4.0.5
home: https://github.com/stashed/mongodb
icon: https://cdn.appscode.com/images/icon/stash.png
sources:
- https://github.com/stashed/mongodb
- https://github.com/stashed/mongodb
maintainers:
- name: appscode
email: [email protected]
- name: appscode
email: [email protected]
4 changes: 2 additions & 2 deletions charts/stash-mongodb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $ helm install stash-mongodb-4.0.5 appscode/stash-mongodb -n kube-system --versi

## Introduction

This chart deploys necessary `Function` and `Task` definition to backup or restore MongoDB database 4.0.5 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 MongoDB 4.0.5 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-mongodb-4.0.5`:
$ helm install stash-mongodb-4.0.5 appscode/stash-mongodb -n kube-system --version=4.0.5
```

The command deploys necessary `Function` and `Task` definition to backup or restore MongoDB database 4.0.5 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 MongoDB 4.0.5 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
5 changes: 3 additions & 2 deletions charts/stash-mongodb/doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ project:
shortName: stash-mongodb
url: https://github.com/stashed/mongodb
description: "MongoDB database backup/restore plugin for [Stash by AppsCode](https://stash.run)"
app: "necessary `Function` and `Task` definition to backup or restore MongoDB database 4.0.5 using Stash"
app: "necessary `Function` and `Task` definition to backup or restore MongoDB 4.0.5
using Stash"
repository:
url: https://charts.appscode.com/stable/
name: appscode
chart:
name: stash-mongodb
version: "4.0.5"
version: 4.0.5
values: "-- generate from values file --"
valuesExample: "-- generate from values file --"
prerequisites:
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 84c004f

Please sign in to comment.