diff --git a/HISTORY.rst b/HISTORY.rst index ca81838c..a275d21b 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,12 @@ Release History =============== +0.10.2 (2015-01-06) +------------------- + +* Fixed an issue with ``--json-output`` (`issue #42 `_) +* Fixed an exception during `platformio upgrade `__ under Windows OS (`issue #45 `_) + 0.10.1 (2015-01-02) ------------------- diff --git a/docs/platforms/atmelavr.rst b/docs/platforms/atmelavr.rst index 9b8aa94d..9e9722d9 100644 --- a/docs/platforms/atmelavr.rst +++ b/docs/platforms/atmelavr.rst @@ -250,6 +250,11 @@ Engduino - 32 Kb - 2.5 Kb +.. note:: + If you are going to use onboard sensors, please install + `Engduino library `_ + with the examples. + More detailed information you can find here `Engduino Site `_. diff --git a/platformio/__init__.py b/platformio/__init__.py index 6fdb367f..f55145c6 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -1,7 +1,7 @@ # Copyright (C) Ivan Kravets # See LICENSE for details. -VERSION = (0, 10, 1) +VERSION = (0, 10, 2) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/commands/lib.py b/platformio/commands/lib.py index f3b87445..96b750e5 100644 --- a/platformio/commands/lib.py +++ b/platformio/commands/lib.py @@ -1,12 +1,15 @@ # Copyright (C) Ivan Kravets # See LICENSE for details. +import json + import click from platformio import app, exception from platformio.libmanager import LibraryManager from platformio.util import get_api_result, get_lib_dir + LIBLIST_TPL = ("[{id:^14}] {name:<25} {compatibility:<30} " "\"{authornames}\": {description}") @@ -160,7 +163,7 @@ def lib_list(json_output): items = lm.get_installed().values() if json_output: - click.echo(items) + click.echo(json.dumps(items)) return if not items: diff --git a/platformio/commands/list.py b/platformio/commands/list.py index 3520d2ad..c47a95b8 100644 --- a/platformio/commands/list.py +++ b/platformio/commands/list.py @@ -1,6 +1,8 @@ # Copyright (C) Ivan Kravets # See LICENSE for details. +import json + import click from platformio.platforms.base import PlatformFactory @@ -23,7 +25,7 @@ def cli(json_output): }) if json_output: - click.echo(data) + click.echo(json.dumps(data)) else: for item in data: click.echo("{name:<20} with packages: {pkgs}".format( diff --git a/platformio/commands/serialports.py b/platformio/commands/serialports.py index d62d9482..c52f27da 100644 --- a/platformio/commands/serialports.py +++ b/platformio/commands/serialports.py @@ -1,6 +1,7 @@ # Copyright (C) Ivan Kravets # See LICENSE for details. +import json import sys import click @@ -19,7 +20,7 @@ def cli(): def serialports_list(json_output): if json_output: - click.echo(get_serialports()) + click.echo(json.dumps(get_serialports())) return for item in get_serialports(): diff --git a/platformio/commands/upgrade.py b/platformio/commands/upgrade.py index 212744a6..75172ccf 100644 --- a/platformio/commands/upgrade.py +++ b/platformio/commands/upgrade.py @@ -23,9 +23,19 @@ def cli(): "newest version available." % __version__, fg="green" ) else: - result = exec_command(["pip", "install", "--upgrade", "platformio"]) - click.secho(result['out'], fg="green") - click.secho(result['err'], fg="red") + click.secho("Please wait while upgrading PlatformIO ...", + fg="yellow") + + pip_result = exec_command(["pip", "install", "--upgrade", + "platformio"]) + pio_result = exec_command(["platformio", "--version"]) + + if last in pio_result['out'].strip(): + click.secho("PlatformIO has been successfully upgraded to %s" % + last, fg="green") + else: + click.secho(pip_result['out'], fg="green") + click.secho(pip_result['err'], fg="red") def get_latest_version():