]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Documentation update
authorEugeny Shcheglov <eugenyshcheglov@gmail.com>
Fri, 26 Jul 2024 10:33:40 +0000 (13:33 +0300)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 26 Jul 2024 10:50:58 +0000 (12:50 +0200)
Add IMAGE_ID and IMAGE_VERSION to the available variables list

mkosi/resources/mkosi.md

index 3438ec66b75b4d0eb8f291b7f913e26e7862d848..ffd026d3a75cc5e3721741a56dfaafca1b991bcd 100644 (file)
@@ -2166,6 +2166,10 @@ Scripts executed by mkosi receive the following environment variables:
   current image. This file can be parsed inside scripts to gain access to all
   settings for the current image.
 
+* `$IMAGE_ID` contains the identifier from the `ImageId=` or `--image-id=` setting.
+
+* `$IMAGE_VERSION` contains the version from the `ImageVersion=` or `--image-version=` setting
+
 Consult this table for which script receives which environment variables:
 
 | Variable                    | `configure` | `sync` | `prepare` | `build` | `postinst` | `finalize` | `postoutput` | `clean` |
@@ -2196,6 +2200,8 @@ Consult this table for which script receives which environment variables:
 | `MKOSI_UID`                 | ✓           | ✓      | ✓         | ✓       | ✓          | ✓          | ✓            | ✓       |
 | `MKOSI_GID`                 | ✓           | ✓      | ✓         | ✓       | ✓          | ✓          | ✓            | ✓       |
 | `MKOSI_CONFIG`              |             | ✓      | ✓         | ✓       | ✓          | ✓          | ✓            | ✓       |
+| `IMAGE_ID`                  | ✓           | ✓      | ✓         | ✓       | ✓          | ✓          | ✓            | ✓       |
+| `IMAGE_VERSION`             | ✓           | ✓      | ✓         | ✓       | ✓          | ✓          | ✓            | ✓       |
 
 Additionally, when a script is executed, a few scripts are made
 available via `$PATH` to simplify common usecases.