Skip to content

Commit 4fe27ae

Browse files
committed
arduino-ci.py: Main parser only prints help.
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
1 parent 30d9efa commit 4fe27ae

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

arduino-ci.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,7 +1272,7 @@ def __init__(self):
12721272
"""
12731273
# Get the script name without .py extension
12741274
self.ci_tool_name = os.path.splitext(os.path.basename(__file__))[0]
1275-
self.ci_tool_version = "0.2.0"
1275+
self.ci_tool_version = "0.3.0"
12761276
self.__create_parser()
12771277

12781278
args = self.parser.parse_args(namespace=argparse.Namespace(ci_parser=self))
@@ -1300,6 +1300,15 @@ def __main_parser_func(self, args):
13001300
"""
13011301
Main parser function of arduino CI cli tool
13021302
"""
1303+
self.parser.print_help()
1304+
1305+
def __get_ci_config(self, args):
1306+
"""
1307+
Get ci configuration instance
1308+
If no configuration file is provided,
1309+
it will use the default configuration file
1310+
in the root path of the asset.
1311+
"""
13031312
if args.ci_matrix_yml is None:
13041313
args.ci_matrix_yml = os.path.join(args.root_path, "ci-matrix-config.yml")
13051314

@@ -1337,23 +1346,23 @@ def print_config(queried_config, args):
13371346
else:
13381347
print(queried_config)
13391348

1340-
ci_config = self.__main_parser_func(args)
1349+
ci_config = self.__get_ci_config(args)
13411350
queried_config = get_queried_config(ci_config, args)
13421351
print_config(queried_config, args)
13431352

13441353
def __compile_parser_func(self, args):
13451354
"""
13461355
Compile parser function of arduino CI cli tool
13471356
"""
1348-
ci_config = self.__main_parser_func(args)
1357+
ci_config = self.__get_ci_config(args)
13491358
ci_compiler = CiCompiler(ci_config)
13501359
ci_compiler.compile(args.fqbn, args.sketch)
13511360

13521361
def __core_install_parser_func(self, args):
13531362
"""
13541363
Core install parser function of arduino CI cli tool
13551364
"""
1356-
ci_config = self.__main_parser_func(args)
1365+
ci_config = self.__get_ci_config(args)
13571366
ci_core_installer = CiCoreInstaller(ci_config)
13581367
ci_core_installer.install(args.fqbn)
13591368

0 commit comments

Comments
 (0)