forked from platformio/platformio-core
Improve "update" command; add test
This commit is contained in:
1 parent
82a7e67bec
commit
11c8ab52f6
5 files changed
+234
-69
No files matched your search
@@ -21,7 +21,6 @@ import sys
|
||||
from os.path import basename, commonprefix, isdir, isfile, join, realpath
|
||||
|
||||
import SCons.Scanner
|
||||
from SCons.Script import COMMAND_LINE_TARGETS
|
||||
|
||||
from platformio import util
|
||||
from platformio.builder.tools import platformio as piotool
|
||||
|
||||
@@ -16,12 +16,24 @@ import click
|
||||
|
||||
from platformio.commands.lib import lib_update as cmd_lib_update
|
||||
from platformio.commands.platform import platform_update as cmd_platform_update
|
||||
from platformio.managers.lib import LibraryManager
|
||||
|
||||
|
||||
@click.command("update",
|
||||
short_help="Update installed Platforms, Packages and Libraries")
|
||||
@click.option(
|
||||
"-c",
|
||||
"--only-check",
|
||||
is_flag=True,
|
||||
help="Do not update, only check for new version")
|
||||
@click.pass_context
|
||||
def cli(ctx):
|
||||
ctx.invoke(cmd_platform_update)
|
||||
def cli(ctx, only_check):
|
||||
click.echo("Platform Manager")
|
||||
click.echo("================")
|
||||
ctx.invoke(cmd_platform_update, only_check=only_check)
|
||||
|
||||
click.echo()
|
||||
ctx.invoke(cmd_lib_update)
|
||||
click.echo("Library Manager")
|
||||
click.echo("===============")
|
||||
ctx.obj = LibraryManager()
|
||||
ctx.invoke(cmd_lib_update, only_check=only_check)
|
||||
Reference in new issue
Block a user