Skip to content

Commit 7e64f45

Browse files
committed
doc: mention version subcommand
We didn't have any mention of `--version` in our docs but let's make sure we document the new `version` subcommand. Signed-off-by: Simon de Vlieger <cmdr@supakeen.com>
1 parent 8c6838b commit 7e64f45

2 files changed

Lines changed: 49 additions & 0 deletions

File tree

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,25 @@ $ image-builder list --format=json
261261
]
262262
```
263263

264+
### Version information
265+
266+
To show version information about the installed `image-builder`:
267+
```console
268+
$ image-builder version
269+
image-builder:
270+
version: 0.5
271+
commit: abc123
272+
dependencies:
273+
images: v0.100.0
274+
osbuild: "105"
275+
```
276+
277+
The output format can be changed with `--format`, supported formats are `yaml` (default) and `json`:
278+
```console
279+
$ image-builder version --format=json | jq '.["image-builder"].version'
280+
"0.5"
281+
```
282+
264283
## Modifying the set of used repositories
265284

266285
There are various ways to add extra repositories or override the default

doc/01-usage.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,36 @@ $ image-builder manifest --arch aarch64 minimal-raw-xz
341341
# ... output ...
342342
```
343343

344+
## `image-builder version`
345+
346+
The `version` command prints version information about the `image-builder` binary including its dependencies.
347+
348+
```console
349+
$ image-builder version
350+
image-builder:
351+
version: 0.5
352+
commit: abc123
353+
dependencies:
354+
images: v0.100.0
355+
osbuild: "105"
356+
```
357+
358+
The output format can be changed with `--format`. Available formats are `yaml` (default) and `json`:
359+
360+
```console
361+
$ image-builder version --format=json
362+
{
363+
"image-builder": {
364+
"version": "0.5",
365+
"commit": "abc123",
366+
"dependencies": {
367+
"images": "v0.100.0",
368+
"osbuild": "105"
369+
}
370+
}
371+
}
372+
```
373+
344374
## Blueprints
345375

346376
Images can be customized with [blueprints](https://osbuild.org/docs/user-guide/blueprint-reference). For example we could build the `qcow2` we built above with some customizations applied.

0 commit comments

Comments
 (0)