Replace TYPE for board/platform with ID // Resolve #459

This commit is contained in:
Ivan Kravets
2016-08-26 16:09:52 +03:00
parent 3e403ef9ee
commit 37dff70cd6
17 changed files with 33 additions and 39 deletions

View File

@ -56,7 +56,7 @@ Put ``appveyor.yml`` to the root directory of the GitHub repository.
- cmd: pip install -U platformio - cmd: pip install -U platformio
test_script: test_script:
- cmd: platformio ci --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - cmd: platformio ci --board=ID_1 --board=ID_2 --board=ID_N
For more details as for PlatformIO build process please look into :ref:`cmd_ci` For more details as for PlatformIO build process please look into :ref:`cmd_ci`

View File

@ -49,9 +49,9 @@ guide first.
test: test:
override: override:
- platformio ci path/to/test/file.c --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - platformio ci path/to/test/file.c --board=ID_1 --board=ID_2 --board=ID_N
- platformio ci examples/file.ino --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - platformio ci examples/file.ino --board=ID_1 --board=ID_2 --board=ID_N
- platformio ci path/to/test/directory --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - platformio ci path/to/test/directory --board=ID_1 --board=ID_2 --board=ID_N
For more details as for PlatformIO build process please look into :ref:`cmd_ci`. For more details as for PlatformIO build process please look into :ref:`cmd_ci`.
@ -65,7 +65,7 @@ it), please use ``--lib="."`` option for :ref:`cmd_ci` command
.. code-block:: yaml .. code-block:: yaml
script: script:
- platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - platformio ci --lib="." --board=ID_1 --board=ID_2 --board=ID_N
Library dependecies Library dependecies
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
@ -87,7 +87,7 @@ Install dependent library using :ref:`librarymanager`
test: test:
override: override:
- platformio ci path/to/test/file.c --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - platformio ci path/to/test/file.c --board=ID_1 --board=ID_2 --board=ID_N
Manually download dependent library and include in build process via ``--lib`` option Manually download dependent library and include in build process via ``--lib`` option
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -105,7 +105,7 @@ Manually download dependent library and include in build process via ``--lib`` o
test: test:
override: override:
- platformio ci path/to/test/file.c --lib="/tmp/OneWire-master" --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - platformio ci path/to/test/file.c --lib="/tmp/OneWire-master" --board=ID_1 --board=ID_2 --board=ID_N
Custom Build Flags Custom Build Flags
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~

View File

@ -51,7 +51,7 @@ Please fill all fields for your project in the Drone control panel:
.. code-block:: bash .. code-block:: bash
pip install -U platformio pip install -U platformio
platformio ci --board=TYPE_1 --board=TYPE_2 --board=TYPE_N platformio ci --board=ID_1 --board=ID_2 --board=ID_N
.. image:: ../_static/droneci-platformio-integration-1.png .. image:: ../_static/droneci-platformio-integration-1.png

View File

@ -58,7 +58,7 @@ GitHub repository.
- pip install -U platformio - pip install -U platformio
script: script:
- platformio ci --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - platformio ci --board=ID_1 --board=ID_2 --board=ID_N
For more details as for PlatformIO build process please look into :ref:`cmd_ci` For more details as for PlatformIO build process please look into :ref:`cmd_ci`

View File

@ -72,7 +72,7 @@ PlatformIO is written in Python and is recommended to be run within
- pip install -U platformio - pip install -U platformio
script: script:
- platformio ci --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - platformio ci --board=ID_1 --board=ID_2 --board=ID_N
Then perform steps 1, 2 and 4 from http://docs.travis-ci.com/user/getting-started/ Then perform steps 1, 2 and 4 from http://docs.travis-ci.com/user/getting-started/
@ -87,7 +87,7 @@ it), please use ``--lib="."`` option for :ref:`cmd_ci` command
.. code-block:: yaml .. code-block:: yaml
script: script:
- platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - platformio ci --lib="." --board=ID_1 --board=ID_2 --board=ID_N
Library dependecies Library dependecies
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
@ -121,7 +121,7 @@ Manually download dependent library and include in build process via ``--lib`` o
- unzip /tmp/onewire_source.zip -d /tmp/ - unzip /tmp/onewire_source.zip -d /tmp/
script: script:
- platformio ci --lib="/tmp/OneWire-master" --board=TYPE_1 --board=TYPE_2 --board=TYPE_N - platformio ci --lib="/tmp/OneWire-master" --board=ID_1 --board=ID_2 --board=ID_N
Custom Build Flags Custom Build Flags
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~

View File

@ -31,12 +31,12 @@ page for more detailed information.
Integration Integration
----------- -----------
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_ Choose board ``ID`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_
command and generate project via :option:`platformio init --ide` command: command and generate project via :option:`platformio init --ide` command:
.. code-block:: shell .. code-block:: shell
platformio init --ide clion --board %TYPE% platformio init --ide clion --board %ID%
# For example, generate project for Arduino UNO # For example, generate project for Arduino UNO
platformio init --ide clion --board uno platformio init --ide clion --board uno

View File

@ -30,12 +30,12 @@ CodeBlocks IDE can be downloaded from `here <http://www.codeblocks.org/downloads
Integration Integration
----------- -----------
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_ Choose board ``ID`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_
command and generate project via :option:`platformio init --ide` command: command and generate project via :option:`platformio init --ide` command:
.. code-block:: shell .. code-block:: shell
platformio init --ide codeblocks --board %TYPE% platformio init --ide codeblocks --board %ID%
# For example, generate project for Arduino UNO # For example, generate project for Arduino UNO
platformio init --ide codeblocks --board uno platformio init --ide codeblocks --board uno

View File

@ -35,12 +35,12 @@ page for more detailed information.
Integration Integration
----------- -----------
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_ Choose board ``ID`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_
command and generate project via :option:`platformio init --ide` command: command and generate project via :option:`platformio init --ide` command:
.. code-block:: shell .. code-block:: shell
platformio init --ide eclipse --board %TYPE% platformio init --ide eclipse --board %ID%
# For example, generate project for Arduino UNO # For example, generate project for Arduino UNO
platformio init --ide eclipse --board uno platformio init --ide eclipse --board uno

View File

@ -45,12 +45,12 @@ Code completion can optionally be provided by installing `irony-mode <https://gi
Project Generator Project Generator
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_ Choose board ``ID`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_
command and generate project via :option:`platformio init --ide` command: command and generate project via :option:`platformio init --ide` command:
.. code-block:: shell .. code-block:: shell
platformio init --ide emacs --board %TYPE% platformio init --ide emacs --board %ID%
There are 6 predefined targets for building. There are 6 predefined targets for building.

View File

@ -33,12 +33,12 @@ install the C/C++ development plugins).
Integration Integration
----------- -----------
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_ Choose board ``ID`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_
command and generate project via :option:`platformio init --ide` command: command and generate project via :option:`platformio init --ide` command:
.. code-block:: shell .. code-block:: shell
platformio init --ide netbeans --board %TYPE% platformio init --ide netbeans --board %ID%
# For example, generate project for Arduino UNO # For example, generate project for Arduino UNO
platformio init --ide netbeans --board uno platformio init --ide netbeans --board uno

View File

@ -35,12 +35,12 @@ Integration
Project Generator Project Generator
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_ Choose board ``ID`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_
command and generate project via :option:`platformio init --ide` command: command and generate project via :option:`platformio init --ide` command:
.. code-block:: shell .. code-block:: shell
platformio init --ide qtcreator --board %TYPE% platformio init --ide qtcreator --board %ID%
# For example, generate project for Arduino UNO # For example, generate project for Arduino UNO
platformio init --ide qtcreator --board uno platformio init --ide qtcreator --board uno

View File

@ -42,12 +42,12 @@ steps and documentation.
Project Generator Project Generator
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_ Choose board ``ID`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_
command and generate project via :option:`platformio init --ide` command: command and generate project via :option:`platformio init --ide` command:
.. code-block:: shell .. code-block:: shell
platformio init --ide sublimetext --board %TYPE% platformio init --ide sublimetext --board %ID%
# For example, generate project for Arduino UNO # For example, generate project for Arduino UNO
platformio init --ide sublimetext --board uno platformio init --ide sublimetext --board uno

View File

@ -35,12 +35,12 @@ Integration
Project Generator Project Generator
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_ Choose board ``ID`` using :ref:`cmd_boards` or `Embedded Boards Explorer <http://platformio.org/boards>`_
command and generate project via :option:`platformio init --ide` command: command and generate project via :option:`platformio init --ide` command:
.. code-block:: shell .. code-block:: shell
platformio init --ide sublimetext --board %TYPE% platformio init --ide sublimetext --board %ID%
# For example, generate project for Arduino UNO # For example, generate project for Arduino UNO
platformio init --ide visualstudio --board uno platformio init --ide visualstudio --board uno

View File

@ -52,7 +52,7 @@ A path to the directory where *PlatformIO* will initialize new project.
.. option:: .. option::
-b, --board -b, --board
If you specify board ``type`` (you can pass multiple ``--board`` options), then If you specify board ``ID`` (you can pass multiple ``--board`` options), then
*PlatformIO* will automatically generate environment for :ref:`projectconf` and *PlatformIO* will automatically generate environment for :ref:`projectconf` and
pre-fill these data: pre-fill these data:

View File

@ -56,10 +56,9 @@ def platform_search(query, json_output):
if query and query.lower() not in search_data.lower(): if query and query.lower() not in search_data.lower():
continue continue
# @TODO update API with NAME/TITLE
platforms.append({ platforms.append({
"name": platform['type'], "name": platform['name'],
"title": platform['name'], "title": platform['title'],
"description": platform['description'], "description": platform['description'],
"packages": platform['packages'] "packages": platform['packages']
}) })

View File

@ -117,12 +117,7 @@ class PlatformManager(BasePkgManager):
@staticmethod @staticmethod
@util.memoized @util.memoized
def get_registered_boards(): def get_registered_boards():
boards = util.get_api_result("/boards") return util.get_api_result("/boards")
for item in boards:
# @TODO remove type from API
item['id'] = item['type']
del item['type']
return boards
class PlatformFactory(object): class PlatformFactory(object):