mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-31 10:37:13 +02:00
Deprecate "pio update", "pio lib", and "pio platform" commands
This commit is contained in:
@ -16,7 +16,7 @@ PlatformIO Core 6
|
|||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
* Improved support for the renamed configuration options (`issue #4270 <https://github.com/platformio/platformio-core/issues/4270>`_)
|
* Improved support for the renamed configuration options (`issue #4270 <https://github.com/platformio/platformio-core/issues/4270>`_)
|
||||||
* Fixed an issue when calling the built-in `pio device monitor <https://docs.platformio.org/en/latest/core/userguide/device/cmd_monitor.html#filters>`__ filter
|
* Fixed an issue when calling the built-in `pio device monitor <https://docs.platformio.org/en/latest/core/userguide/device/cmd_monitor.html#filters>`__ filters
|
||||||
* Fixed an issue when using |INTERPOLATION| and merging str+int options (`issue #4271 <https://github.com/platformio/platformio-core/issues/4271>`_)
|
* Fixed an issue when using |INTERPOLATION| and merging str+int options (`issue #4271 <https://github.com/platformio/platformio-core/issues/4271>`_)
|
||||||
|
|
||||||
6.0.0 (2022-05-16)
|
6.0.0 (2022-05-16)
|
||||||
|
2
docs
2
docs
Submodule docs updated: dfef63a7f1...2ea8592203
@ -68,6 +68,14 @@ def get_project_global_lib_dir():
|
|||||||
)
|
)
|
||||||
@click.pass_context
|
@click.pass_context
|
||||||
def cli(ctx, **options):
|
def cli(ctx, **options):
|
||||||
|
in_silence = PlatformioCLI.in_silence()
|
||||||
|
if not in_silence:
|
||||||
|
click.secho(
|
||||||
|
"\nWARNING!!! This command is deprecated and will be removed in "
|
||||||
|
"the next releases. \nPlease use `pio pkg` instead.\n",
|
||||||
|
fg="yellow",
|
||||||
|
)
|
||||||
|
|
||||||
storage_cmds = ("install", "uninstall", "update", "list")
|
storage_cmds = ("install", "uninstall", "update", "list")
|
||||||
# skip commands that don't need storage folder
|
# skip commands that don't need storage folder
|
||||||
if ctx.invoked_subcommand not in storage_cmds or (
|
if ctx.invoked_subcommand not in storage_cmds or (
|
||||||
@ -94,7 +102,6 @@ def cli(ctx, **options):
|
|||||||
get_project_dir(), get_project_global_lib_dir(), ctx.invoked_subcommand
|
get_project_dir(), get_project_global_lib_dir(), ctx.invoked_subcommand
|
||||||
)
|
)
|
||||||
|
|
||||||
in_silence = PlatformioCLI.in_silence()
|
|
||||||
ctx.meta[CTX_META_PROJECT_ENVIRONMENTS_KEY] = options["environment"]
|
ctx.meta[CTX_META_PROJECT_ENVIRONMENTS_KEY] = options["environment"]
|
||||||
ctx.meta[CTX_META_INPUT_DIRS_KEY] = storage_dirs
|
ctx.meta[CTX_META_INPUT_DIRS_KEY] = storage_dirs
|
||||||
ctx.meta[CTX_META_STORAGE_DIRS_KEY] = []
|
ctx.meta[CTX_META_STORAGE_DIRS_KEY] = []
|
||||||
|
@ -18,6 +18,7 @@ import os
|
|||||||
|
|
||||||
import click
|
import click
|
||||||
|
|
||||||
|
from platformio.commands import PlatformioCLI
|
||||||
from platformio.commands.boards import print_boards
|
from platformio.commands.boards import print_boards
|
||||||
from platformio.exception import UserSideException
|
from platformio.exception import UserSideException
|
||||||
from platformio.package.exception import UnknownPackageError
|
from platformio.package.exception import UnknownPackageError
|
||||||
@ -30,7 +31,12 @@ from platformio.platform.factory import PlatformFactory
|
|||||||
|
|
||||||
@click.group(short_help="Platform manager", hidden=True)
|
@click.group(short_help="Platform manager", hidden=True)
|
||||||
def cli():
|
def cli():
|
||||||
pass
|
if not PlatformioCLI.in_silence():
|
||||||
|
click.secho(
|
||||||
|
"\nWARNING!!! This command is deprecated and will be removed in "
|
||||||
|
"the next releases. \nPlease use `pio pkg` instead.\n",
|
||||||
|
fg="yellow",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@cli.command("search", short_help="Search for development platform")
|
@cli.command("search", short_help="Search for development platform")
|
||||||
|
@ -14,12 +14,6 @@
|
|||||||
|
|
||||||
import click
|
import click
|
||||||
|
|
||||||
from platformio.commands.lib.command import CTX_META_STORAGE_DIRS_KEY
|
|
||||||
from platformio.commands.lib.command import lib_update as cmd_lib_update
|
|
||||||
from platformio.commands.platform import platform_update as cmd_platform_update
|
|
||||||
from platformio.package.manager.core import update_core_packages
|
|
||||||
from platformio.package.manager.library import LibraryPackageManager
|
|
||||||
|
|
||||||
|
|
||||||
@click.command(
|
@click.command(
|
||||||
"update",
|
"update",
|
||||||
@ -36,23 +30,9 @@ from platformio.package.manager.library import LibraryPackageManager
|
|||||||
@click.option(
|
@click.option(
|
||||||
"--dry-run", is_flag=True, help="Do not update, only check for the new versions"
|
"--dry-run", is_flag=True, help="Do not update, only check for the new versions"
|
||||||
)
|
)
|
||||||
@click.pass_context
|
def cli(*_, **__):
|
||||||
def cli(ctx, core_packages, only_check, dry_run):
|
click.secho(
|
||||||
only_check = dry_run or only_check
|
"This command is deprecated and will be removed in the next releases. \n"
|
||||||
|
"Please use `pio pkg update` instead.",
|
||||||
if not only_check:
|
fg="yellow",
|
||||||
update_core_packages()
|
)
|
||||||
|
|
||||||
if core_packages:
|
|
||||||
return
|
|
||||||
|
|
||||||
click.echo()
|
|
||||||
click.echo("Platform Manager")
|
|
||||||
click.echo("================")
|
|
||||||
ctx.invoke(cmd_platform_update, only_check=only_check)
|
|
||||||
|
|
||||||
click.echo()
|
|
||||||
click.echo("Library Manager")
|
|
||||||
click.echo("===============")
|
|
||||||
ctx.meta[CTX_META_STORAGE_DIRS_KEY] = [LibraryPackageManager().package_dir]
|
|
||||||
ctx.invoke(cmd_lib_update, only_check=only_check)
|
|
||||||
|
Reference in New Issue
Block a user