You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+49-3Lines changed: 49 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,13 +5,59 @@ This is a small tool for bumping [SemVer](https://semver.org/) versions in YAML
5
5
**NOTE**: This is a very early version - it works, but it's not particularly
6
6
hardened.
7
7
8
-
Usage:
8
+
## Usage
9
9
10
10
```shell
11
11
$ yaml-versioner increment --filename pkg/versioner/testdata/Chart.yaml --key version --patch=true
12
12
```
13
13
14
+
This would update the file `pkg/versioner/testdata/Chart.yaml` as a YAML file, incrementing the [SemVer](https://semver.org/) in the top-level `.version` key, but only incrementing the _patch_ level.
15
+
16
+
If the file looked like this:
17
+
18
+
```yaml
19
+
apiVersion: v2
20
+
name: test-controller
21
+
description: A Helm chart for Kubernetes
22
+
type: application
23
+
version: 1.0.1
24
+
appVersion: "1.0.0"
25
+
```
26
+
27
+
Then it would get changed to look like this:
28
+
29
+
```yaml
30
+
apiVersion: v2
31
+
name: test-controller
32
+
description: A Helm chart for Kubernetes
33
+
type: application
34
+
version: 1.0.2
35
+
appVersion: "1.0.0"
36
+
```
37
+
With a diff of
38
+
39
+
```diff
40
+
type: application
41
+
- version: 1.0.1
42
+
+ version: 1.0.2
43
+
appVersion: "1.0.0"
44
+
```
45
+
46
+
## Incrementing the minor version
47
+
48
+
Incrementing the _minor_ level will result in the patch level being reset to zero.
49
+
50
+
$ yaml-versioner increment --filename pkg/versioner/testdata/Chart.yaml --key version --minor=true
51
+
52
+
```diff
53
+
type: application
54
+
- version: 1.0.1
55
+
+ version: 1.1.0
56
+
appVersion: "1.0.0"
57
+
```
58
+
14
59
## TODO
15
60
16
-
[] Metadata in the CLI
17
-
[] Replace rather than increment (set a specific version)
61
+
* [ ] [Pre-release data](https://semver.org/#spec-item-9) in the CLI
62
+
* [ ] [Build metadata](https://semver.org/#spec-item-10) in the CLI
63
+
* [ ] Replace rather than increment (set a specific version) for example, this would allow bumping the `.appVersion` in the YAML above
0 commit comments