From: Daan De Meyer Date: Sun, 2 Apr 2023 19:06:07 +0000 (+0200) Subject: Move --auto-bump under Content section X-Git-Tag: v15~268^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c949aff3e53878cf64884b345c8388c6d1cd757b;p=thirdparty%2Fmkosi.git Move --auto-bump under Content section Let's collocate --auto-bump with --image-version which it is closely related to. --- diff --git a/mkosi.md b/mkosi.md index bbe8fd162..f499ac8c0 100644 --- a/mkosi.md +++ b/mkosi.md @@ -391,7 +391,7 @@ a boolean argument: either "1", "yes", or "true" to enable, or "0", recommended to specify a series of dot separated components. The version may also be configured in a file `mkosi.version` in which case it may be conveniently managed via the `bump` verb or the - `--auto-bump` switch. When specified the image version is included + `--auto-bump` option. When specified the image version is included in the default output file name, i.e. instead of `image.raw` the default will be `image_0.1.raw` for version `0.1` of the image, and similar. The version is also passed via the `$IMAGE_VERSION` to any @@ -399,6 +399,14 @@ a boolean argument: either "1", "yes", or "true" to enable, or "0", `/etc/os-release` or similar, in particular the `IMAGE_VERSION=` field of it). +`AutoBump=`, `--auto-bump=`, `-B` + +: If specified, after each successful build the the version is bumped + in a fashion equivalent to the `bump` verb, in preparation for the + next build. This is useful for simple, linear version management: + each build in a series will have a version number one higher then + the previous one. + `ImageId=`, `--image-id=` : Configure the image identifier. This accepts a freeform string that @@ -889,14 +897,6 @@ Those settings cannot be configured in the configuration files. : Show brief usage information. -`--auto-bump`, `-B` - -: If specified, after each successful build the the version is bumped - in a fashion equivalent to the `bump` verb, in preparation for the - next build. This is useful for simple, linear version management: - each build in a series will have a version number one higher then - the previous one. - ## Supported distributions Images may be created containing installations of the diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 4a864347e..9f46d946e 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -1530,6 +1530,12 @@ def create_parser() -> ArgumentParserMkosi: group.add_argument("--hostname", help="Set hostname") group.add_argument("--image-version", help="Set version for image") group.add_argument("--image-id", help="Set ID for image") + group.add_argument( + "-B", "--auto-bump", + metavar="BOOL", + action=BooleanAction, + help="Automatically bump image version after building", + ) group.add_argument( "--tar-strip-selinux-context", metavar="BOOL", @@ -1847,13 +1853,6 @@ def create_parser() -> ArgumentParserMkosi: type=Path, metavar="PATH", ) - group.add_argument( - "-B", - "--auto-bump", - metavar="BOOL", - action=BooleanAction, - help="Automatically bump image version after building", - ) group.add_argument( "--debug", action=CommaDelimitedListAction,