forked from platformio/platformio-core
Notify about multiple installations of PIO Core // Resolve #961
This commit is contained in:
@ -12,7 +12,7 @@ PlatformIO 3.0
|
||||
- 100+ boards
|
||||
- Multiple architectures and development platforms
|
||||
- Zero Configuration
|
||||
- Compatibility with the popular IDEs: Eclipse, Atom, VSCode, Sublime Text, etc
|
||||
- Compatibility with the popular IDEs: Atom, VSCode, Eclipse, Sublime Text, etc
|
||||
- Windows, MacOS, Linux (+ARMv6-8)
|
||||
|
||||
* Project generator for `VIM <http://docs.platformio.org/page/ide/vim.html>`__
|
||||
@ -21,6 +21,8 @@ PlatformIO 3.0
|
||||
(`issue #889 <https://github.com/platformio/platformio-core/issues/889>`_)
|
||||
* Handle dynamic ``SRC_FILTER`` environment variable from
|
||||
`library.json extra script <http://docs.platformio.org/page/librarymanager/config.html#extrascript>`__
|
||||
* Notify about multiple installations of PIO Core
|
||||
(`issue #961 <https://github.com/platformio/platformio-core/issues/961>`_)
|
||||
* Improved auto-detecting of mbed-enabled media disks
|
||||
* Automatically update Git-submodules for development platforms and libraries
|
||||
that were installed from repository
|
||||
|
2
docs
2
docs
Submodule docs updated: 2c942c080b...f49813d110
@ -156,12 +156,29 @@ class Upgrader(object):
|
||||
|
||||
|
||||
def after_upgrade(ctx):
|
||||
terminal_width, _ = click.get_terminal_size()
|
||||
last_version = app.get_state_item("last_version", "0.0.0")
|
||||
if last_version == __version__:
|
||||
return
|
||||
|
||||
if last_version == "0.0.0":
|
||||
app.set_state_item("last_version", __version__)
|
||||
elif semantic_version.Version.coerce(util.pepver_to_semver(
|
||||
last_version)) > semantic_version.Version.coerce(
|
||||
util.pepver_to_semver(__version__)):
|
||||
click.secho("*" * terminal_width, fg="yellow")
|
||||
click.secho(
|
||||
"Obsolete PIO Core v%s is used (previous was %s)" %
|
||||
(__version__, last_version),
|
||||
fg="yellow")
|
||||
click.secho(
|
||||
"Please remove multiple PIO Cores from a system:", fg="yellow")
|
||||
click.secho(
|
||||
"http://docs.platformio.org/page/faq.html"
|
||||
"#multiple-pio-cores-in-a-system",
|
||||
fg="cyan")
|
||||
click.secho("*" * terminal_width, fg="yellow")
|
||||
return
|
||||
else:
|
||||
click.secho("Please wait while upgrading PlatformIO...", fg="yellow")
|
||||
app.clean_cache()
|
||||
@ -185,7 +202,6 @@ def after_upgrade(ctx):
|
||||
click.echo("")
|
||||
|
||||
# PlatformIO banner
|
||||
terminal_width, _ = click.get_terminal_size()
|
||||
click.echo("*" * terminal_width)
|
||||
click.echo("If you like %s, please:" % (click.style(
|
||||
"PlatformIO", fg="cyan")))
|
||||
|
Reference in New Issue
Block a user