This is a small tool for bumping SemVer versions in YAML files.
NOTE: This is a very early version - it works, but it's not particularly hardened.
$ yaml-versioner increment --filename pkg/versioner/testdata/Chart.yaml --key version --patch=true
This would update the file pkg/versioner/testdata/Chart.yaml
as a YAML file, incrementing the SemVer in the top-level .version
key, but only incrementing the patch level.
If the file looked like this:
apiVersion: v2
name: test-controller
description: A Helm chart for Kubernetes
type: application
version: 1.0.1
appVersion: "1.0.0"
Then it would get changed to look like this:
apiVersion: v2
name: test-controller
description: A Helm chart for Kubernetes
type: application
version: 1.0.2
appVersion: "1.0.0"
With a diff of
type: application
- version: 1.0.1
+ version: 1.0.2
appVersion: "1.0.0"
Incrementing the minor level will result in the patch level being reset to zero.
$ yaml-versioner increment --filename pkg/versioner/testdata/Chart.yaml --key version --minor=true
type: application
- version: 1.0.1
+ version: 1.1.0
appVersion: "1.0.0"
- Pre-release data in the CLI
- Build metadata in the CLI
- Replace rather than increment (set a specific version) for example, this would allow bumping the
.appVersion
in the YAML above