Improve project initialisation

This commit is contained in:
Ivan Kravets
2015-12-07 22:23:20 +02:00
parent b7ab825860
commit dfb93e9682
3 changed files with 51 additions and 15 deletions

View File

@ -27,7 +27,7 @@ Usage
Description Description
----------- -----------
Initialize new PlatformIO based project. Initialize new PlatformIO based project or update existing with new data.
This command will create: This command will create:
@ -36,6 +36,8 @@ This command will create:
* ``src`` - a source directory. Put your source files here * ``src`` - a source directory. Put your source files here
* ``lib`` - a directory for the project specific (private) libraries. * ``lib`` - a directory for the project specific (private) libraries.
PlatformIO will compile them to static libraries and link to executable file PlatformIO will compile them to static libraries and link to executable file
* ``.travis.yml`` configuration file (template) for Continuous Integration
with :ref:`ci_travis`
.. note:: .. note::
The source code of each library should be placed in separate directory. The source code of each library should be placed in separate directory.

View File

@ -228,22 +228,56 @@ def init_ci_conf(project_dir):
# * User Guide for `platformio ci` command # * User Guide for `platformio ci` command
# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html > # < http://docs.platformio.org/en/latest/userguide/cmd_ci.html >
# #
#
# Please choice one of the following templates (proposed below) and uncomment
# it (remove "# " before each line) or use own configuration according to the
# Travis CI documentation (see above).
#
language: python
python:
- "2.7"
# Cache PlatformIO packages using Travis CI container-based infrastructure #
sudo: false # Template #1: General project. Test it using existing `platformio.ini`.
cache: #
directories:
- "~/.platformio"
install: # language: python
- pip install -U platformio # python:
# - "2.7"
#
# sudo: false
# cache:
# directories:
# - "~/.platformio"
#
# install:
# - pip install -U platformio
#
# script:
# - platformio run
script:
- platformio run #
# Template #2: The project is intended to by used as a library with examples
#
# language: python
# python:
# - "2.7"
#
# sudo: false
# cache:
# directories:
# - "~/.platformio"
#
# env:
# - PLATFORMIO_CI_SRC=path/to/test/file.c
# - PLATFORMIO_CI_SRC=examples/file.ino
# - PLATFORMIO_CI_SRC=path/to/test/directory
#
# install:
# - pip install -U platformio
#
# script:
# - platformio ci --lib="." --board=TYPE_1 --board=TYPE_2 --board=TYPE_N
""") """)

View File

@ -141,8 +141,8 @@ def after_upgrade(ctx):
(click.style("follow", fg="cyan"), (click.style("follow", fg="cyan"),
click.style("https://twitter.com/PlatformIO_Org", fg="cyan")) click.style("https://twitter.com/PlatformIO_Org", fg="cyan"))
) )
click.echo("- %s us a star on GitHub > %s" % ( click.echo("- %s it on GitHub! > %s" % (
click.style("give", fg="cyan"), click.style("star", fg="cyan"),
click.style("https://github.com/platformio/platformio", fg="cyan") click.style("https://github.com/platformio/platformio", fg="cyan")
)) ))
click.echo("*" * terminal_width) click.echo("*" * terminal_width)