From 5dac4e3af6fa39d6d729a7ee599c3da775fff7b7 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 15 Jun 2016 18:42:25 +0300 Subject: [PATCH 1/3] Add test for `init --ide eclipse` --- tests/commands/test_init.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/commands/test_init.py b/tests/commands/test_init.py index 93b47053..5e136f47 100644 --- a/tests/commands/test_init.py +++ b/tests/commands/test_init.py @@ -42,6 +42,14 @@ def test_init_ext_folder(platformio_setup, clirunner, validate_cliresult): validate_pioproject(join(getcwd(), ext_folder_name)) +def test_init_ide_eclipse(platformio_setup, clirunner, validate_cliresult): + with clirunner.isolated_filesystem(): + result = clirunner.invoke(cli, ["-b", "uno", "--ide", "eclipse"]) + validate_cliresult(result) + validate_pioproject(getcwd()) + assert all([isfile(f) for f in (".cproject", ".project")]) + + def test_init_special_board(platformio_setup, clirunner, validate_cliresult): with clirunner.isolated_filesystem(): result = clirunner.invoke(cli, ["-b", "uno"]) From 1cab0c168e57816a6391c77e86330c73e786aa92 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 15 Jun 2016 18:42:56 +0300 Subject: [PATCH 2/3] Fix issue with appending PIO version to Build Defines --- platformio/builder/tools/platformio.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index 77d1f60e..01b50f57 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -36,7 +36,9 @@ SRC_DEFAULT_FILTER = " ".join([ def BuildProgram(env): def _append_pio_macros(): - env.AppendUnique( + if any(["PLATFORMIO=" in str(d) for d in env.get("CPPDEFINES", [])]): + return + env.Append( CPPDEFINES=["PLATFORMIO={0:02d}{1:02d}{2:02d}".format( *pioversion_to_intstr())], ) From 2cd22f725e6648b386e0464e27a16d0af07adc95 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 15 Jun 2016 18:46:41 +0300 Subject: [PATCH 3/3] Version bump to 2.10.3 --- HISTORY.rst | 5 +++++ platformio/__init__.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 51981ccf..ec59872a 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,11 @@ Release Notes PlatformIO 2.0 -------------- +2.10.3 (2016-06-15) +~~~~~~~~~~~~~~~~~~~ + +* Fixed issue with ``platformio init --ide`` command + 2.10.2 (2016-06-15) ~~~~~~~~~~~~~~~~~~~ diff --git a/platformio/__init__.py b/platformio/__init__.py index 2c38c6d8..0f8db754 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (2, 10, 2) +VERSION = (2, 10, 3) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio"