Skip to content

Commit

Permalink
WIP: Account for multi-plugin repositories
Browse files Browse the repository at this point in the history
This adds a `plugin` list to the template config. For "usual" plugins
it's populated automatically.

[noissue]
  • Loading branch information
mdellweg committed Nov 17, 2023
1 parent 46db735 commit 9ec2ac3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugin-template
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ DEFAULT_SETTINGS = {
"plugin_app_label": None,
"plugin_default_branch": "main",
"plugin_name": None,
"plugins": None,
"post_job_template": None,
"pre_job_template": None,
"publish_docs_to_pulpprojectdotorg": False,
Expand Down Expand Up @@ -250,6 +251,10 @@ def main():
for key in set(config.keys()) - set(DEFAULT_SETTINGS.keys()):
config.pop(key)
write_new_config = True
if config["plugins"] is None:
config["plugins"] = [
{"name": config["plugin_name"], "app_label": config["plugin_app_label"]}
]
print(
"\nLoaded plugin template config from "
"{path}/template_config.yml.\n".format(path=plugin_root_dir)
Expand Down Expand Up @@ -471,6 +476,7 @@ def generate_config(plugin_name, plugin_app_label):
config = DEFAULT_SETTINGS.copy()
config["plugin_name"] = plugin_name
config["plugin_app_label"] = plugin_app_label
config["plugins"] = [{"name": plugin_name, "app_label": plugin_app_label}]
return config


Expand Down

0 comments on commit 9ec2ac3

Please sign in to comment.