From afe6fe81c4733fe5052b944ad16e755debc4d6d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Wed, 10 Jan 2024 14:43:25 +0100 Subject: [PATCH] kas: add forgotten `tag` key to repos `defaults` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 75f4767 added `tag` to `repos` config but forgot to add it to `defaults`. This commit adds the missing key in schema-kas.json, repos.py and format-changelog.rst. It also fixes the format changelog for v15. Signed-off-by: Félix Piédallu [Jan: update also __file_version__] Signed-off-by: Jan Kiszka --- docs/format-changelog.rst | 11 ++++++++++- docs/userguide.rst | 4 ++++ kas/__version__.py | 2 +- kas/repos.py | 2 +- kas/schema-kas.json | 3 +++ 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/docs/format-changelog.rst b/docs/format-changelog.rst index c44fb3fb..cf7110fc 100644 --- a/docs/format-changelog.rst +++ b/docs/format-changelog.rst @@ -153,4 +153,13 @@ Added ~~~~~ - The key ``tag`` is introduced as a complement to ``commit`` and ``branch`` - in ``repos`` and ``default``. + in ``repos``. + +Version 16 +---------- + +Fixed +~~~~~ + +- The key ``tag`` introduced in v15 was not supported in ``defaults``. + It's now added. diff --git a/docs/userguide.rst b/docs/userguide.rst index a914e68a..28c5cee6 100644 --- a/docs/userguide.rst +++ b/docs/userguide.rst @@ -371,6 +371,10 @@ Configuration reference Sets the default ``branch`` property applied to all repositories that do not override this. + ``tag``: string [optional] + Sets the default ``tag`` property applied to all repositories that + do not override this. + ``patches``: dict [optional] This key can contain default values for some repository patch properties. If a default value is set for a patch property it may diff --git a/kas/__version__.py b/kas/__version__.py index df33277a..88489660 100644 --- a/kas/__version__.py +++ b/kas/__version__.py @@ -28,5 +28,5 @@ __version__ = '4.1' # Please update docs/format-changelog.rst when changing the file version. -__file_version__ = 15 +__file_version__ = 16 __compatible_file_version__ = 1 diff --git a/kas/repos.py b/kas/repos.py index 8a459921..6c4d5a4f 100644 --- a/kas/repos.py +++ b/kas/repos.py @@ -179,7 +179,7 @@ def factory(name, repo_config, repo_defaults, repo_fallback_path, name = repo_config.get('name', name) repo_type = repo_config.get('type', 'git') commit = repo_config.get('commit', None) - tag = repo_config.get('tag', None) + tag = repo_config.get('tag', repo_defaults.get('tag', None)) branch = repo_config.get('branch', repo_defaults.get('branch', None)) refspec = repo_config.get('refspec', repo_defaults.get('refspec', None)) diff --git a/kas/schema-kas.json b/kas/schema-kas.json index 8b9fc8a1..70320789 100644 --- a/kas/schema-kas.json +++ b/kas/schema-kas.json @@ -76,6 +76,9 @@ "branch": { "type": "string" }, + "tag": { + "type": "string" + }, "refspec": { "type": "string" },