Allowed specifying project environments for "pio ci" command // Resolve #4347

This commit is contained in:
Ivan Kravets
2022-07-09 21:58:34 +03:00
parent f032663b33
commit 25074d80d3
3 changed files with 7 additions and 3 deletions

View File

@ -16,6 +16,7 @@ PlatformIO Core 6
6.1.1 (2022-??-??)
~~~~~~~~~~~~~~~~~~
* Allowed specifying project environments for `pio ci <https://docs.platformio.org/en/latest/core/userguide/cmd_ci.html>`__ command (`issue #4347 <https://github.com/platformio/platformio-core/issues/4347>`_)
* Show "TimeoutError" only in the verbose mode when can not find a serial port
* Fixed an issue when a serial port was not automatically detected if the board has predefined HWIDs
* Fixed an issue with endless scanning of project dependencies (`issue #4349 <https://github.com/platformio/platformio-core/issues/4349>`_)

2
docs

Submodule docs updated: c72ff5c901...31b7d077be

View File

@ -62,6 +62,7 @@ def validate_path(ctx, param, value): # pylint: disable=unused-argument
),
)
@click.option("-O", "--project-option", multiple=True)
@click.option("-e", "--environment", "environments", multiple=True)
@click.option("-v", "--verbose", is_flag=True)
@click.pass_context
def cli( # pylint: disable=too-many-arguments, too-many-branches
@ -74,9 +75,9 @@ def cli( # pylint: disable=too-many-arguments, too-many-branches
keep_build_dir,
project_conf,
project_option,
environments,
verbose,
):
if not src and os.getenv("PLATFORMIO_CI_SRC"):
src = validate_path(ctx, None, os.getenv("PLATFORMIO_CI_SRC").split(":"))
if not src:
@ -115,7 +116,9 @@ def cli( # pylint: disable=too-many-arguments, too-many-branches
)
# process project
ctx.invoke(cmd_run, project_dir=build_dir, verbose=verbose)
ctx.invoke(
cmd_run, project_dir=build_dir, environment=environments, verbose=verbose
)
finally:
if not keep_build_dir:
fs.rmtree(build_dir)