forked from platformio/platformio-core
Show notification about new PlatformIO as the bottom of screen
This commit is contained in:
@ -21,7 +21,7 @@ from time import time
|
|||||||
|
|
||||||
import click
|
import click
|
||||||
|
|
||||||
from platformio import __version__, app, exception, telemetry
|
from platformio import __version__, app, exception, telemetry, util
|
||||||
from platformio.commands.lib import lib_update as cmd_libraries_update
|
from platformio.commands.lib import lib_update as cmd_libraries_update
|
||||||
from platformio.commands.platforms import \
|
from platformio.commands.platforms import \
|
||||||
platforms_install as cmd_platforms_install
|
platforms_install as cmd_platforms_install
|
||||||
@ -46,6 +46,8 @@ def on_platformio_start(ctx, force, caller):
|
|||||||
|
|
||||||
after_upgrade(ctx)
|
after_upgrade(ctx)
|
||||||
|
|
||||||
|
|
||||||
|
def on_platformio_end(ctx, result): # pylint: disable=W0613
|
||||||
try:
|
try:
|
||||||
check_platformio_upgrade()
|
check_platformio_upgrade()
|
||||||
check_internal_updates(ctx, "platforms")
|
check_internal_updates(ctx, "platforms")
|
||||||
@ -55,10 +57,6 @@ def on_platformio_start(ctx, force, caller):
|
|||||||
"Please check your Internet connection.", fg="red")
|
"Please check your Internet connection.", fg="red")
|
||||||
|
|
||||||
|
|
||||||
def on_platformio_end(ctx, result): # pylint: disable=W0613
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def on_platformio_exception(e):
|
def on_platformio_exception(e):
|
||||||
telemetry.on_exception(e)
|
telemetry.on_exception(e)
|
||||||
|
|
||||||
@ -149,12 +147,13 @@ def after_upgrade(ctx):
|
|||||||
if not getenv("PLATFORMIO_IDE"):
|
if not getenv("PLATFORMIO_IDE"):
|
||||||
click.echo("- %s PlatformIO IDE for IoT development > %s" % (
|
click.echo("- %s PlatformIO IDE for IoT development > %s" % (
|
||||||
click.style("try", fg="cyan"),
|
click.style("try", fg="cyan"),
|
||||||
click.style("http://platformio.org/", fg="cyan")
|
click.style("http://platformio.org/#!/platformio-ide", fg="cyan")
|
||||||
|
))
|
||||||
|
if not util.is_ci():
|
||||||
|
click.echo("- %s to keep PlatformIO alive! > %s" % (
|
||||||
|
click.style("donate", fg="cyan"),
|
||||||
|
click.style("http://platformio.org/#!/donate", fg="cyan")
|
||||||
))
|
))
|
||||||
click.echo("- %s to keep PlatformIO alive! > %s" % (
|
|
||||||
click.style("donate", fg="cyan"),
|
|
||||||
click.style("http://platformio.org/#!/donate", fg="cyan")
|
|
||||||
))
|
|
||||||
|
|
||||||
click.echo("*" * terminal_width)
|
click.echo("*" * terminal_width)
|
||||||
click.echo("")
|
click.echo("")
|
||||||
|
Reference in New Issue
Block a user