diff --git a/docs/format-changelog.rst b/docs/format-changelog.rst index f16d22c2..5e3504a0 100644 --- a/docs/format-changelog.rst +++ b/docs/format-changelog.rst @@ -171,3 +171,13 @@ Added ~~~~~ - The key ``artifacts`` is introduced to describe expected build artifacts. + +Version 18 +---------- + +Added +~~~~~ + +The repo keys ``tag`` and ``branch`` can now be set to ``null`` to remove +these properties from the repo. This is needed in case a default value is +set in the ``defaults`` section that should not apply to a repo. diff --git a/docs/userguide/project-configuration.rst b/docs/userguide/project-configuration.rst index a0f51e38..536eefbd 100644 --- a/docs/userguide/project-configuration.rst +++ b/docs/userguide/project-configuration.rst @@ -346,15 +346,17 @@ Configuration reference ``commit``, ``branch`` or ``tag``, the revision you get depends on the defaults of the version control system used. - ``branch``: string [optional] + ``branch``: string or nothing (``null``) [optional] The upstream branch that should be tracked. If ``commit`` was specified, kas checks that the branch contains the commit. If no ``commit`` was specified, the head of the upstream branch is checked out. + The nothing (``null``) value is used to remove a possible default value. - ``tag``: string [optional] + ``tag``: string or nothing (``null``) [optional] The tag that should be checked out. If a ``commit`` was specified, kas checks that the tag points to this commit. This must not be combined - with ``branch``. + with ``branch``. The nothing (``null``) value is used to remove a + possible default value. ``path``: string [optional] The path where the repository is stored. diff --git a/kas/__version__.py b/kas/__version__.py index 9ffb4078..874a72b8 100644 --- a/kas/__version__.py +++ b/kas/__version__.py @@ -28,5 +28,5 @@ __version__ = '4.5' # Please update docs/format-changelog.rst when changing the file version. -__file_version__ = 17 +__file_version__ = 18 __compatible_file_version__ = 1 diff --git a/kas/schema-kas.json b/kas/schema-kas.json index 7c1e4fc5..fb267594 100644 --- a/kas/schema-kas.json +++ b/kas/schema-kas.json @@ -170,10 +170,24 @@ "type": "string" }, "branch": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "tag": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "refspec": { "type": "string"