Generate ".gitignore" by default

This commit is contained in:
Ivan Kravets
2015-12-05 23:34:25 +02:00
parent 2345eb3bb7
commit f6686f149b
3 changed files with 10 additions and 2 deletions

View File

@ -9,7 +9,7 @@ PlatformIO 2.0
* Improved code builder for parallel builds (up to 4 times faster than before)
* Generate `.travis.yml <http://docs.platformio.org/en/latest/ci/travis.html>`__
CI config for embedded projects by default
CI and `.gitignore` files for embedded projects by default
(`issue #354 <https://github.com/platformio/platformio/issues/354>`_)
* Removed prompt with "auto-uploading" from `platformio init <http://docs.platformio.org/en/latest/userguide/cmd_init.html>`__
command and added ``--enable-auto-uploading`` option

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
VERSION = (2, 5, "0.dev1")
VERSION = (2, 5, "0.dev2")
__version__ = ".".join([str(s) for s in VERSION])
__title__ = "platformio"

View File

@ -85,6 +85,7 @@ def cli(ctx, project_dir, board, ide, # pylint: disable=R0913
init_lib_readme(lib_dir)
init_ci_conf(project_dir)
init_cvs_ignore(project_dir)
if not isfile(project_file):
copyfile(join(get_source_dir(), "projectconftpl.ini"),
@ -249,3 +250,10 @@ install:
script:
- platformio ci --board=TYPE_1 --board=TYPE_2 --board=TYPE_N
""")
def init_cvs_ignore(project_dir):
if isfile(join(project_dir, ".gitignore")):
return
with open(join(project_dir, ".gitignore"), "w") as f:
f.write(".pioevs")