From b74352eb47fcc22ce3e8786222cf6ce2d8805978 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Tue, 17 Jun 2025 09:14:57 +0200 Subject: [PATCH] allow explicitly providing the plugin root My plugin_template checkout is at ~/Devel/pulp/plugin_template, but the plugin I want to update is at ~/Devel/theforeman/pulp_smart_proxy, so that the automatic root detection doesn't work. --- plugin-template | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plugin-template b/plugin-template index 130040fe..72eb310b 100755 --- a/plugin-template +++ b/plugin-template @@ -213,10 +213,19 @@ def main(): """ ), ) + parser.add_argument( + "--plugin-root-dir", + action="store", + help=textwrap.dedent( + """\ + Root directory of the plugin if it's not '../{plugin_name}' + """ + ), + ) args = parser.parse_args() here = os.path.dirname(os.path.abspath(__file__)) - plugin_root_dir = os.path.join(os.path.dirname(here), args.plugin_name) + plugin_root_dir = args.plugin_root_dir or os.path.join(os.path.dirname(here), args.plugin_name) plugin_config_path = os.path.join(plugin_root_dir, "template_config.yml") write_new_config = False