* Do not re-create ".gitignore" and ".travis.yml" files if they were removed from a project

This commit is contained in:
Ivan Kravets
2018-09-20 14:57:42 +03:00
parent e6fa8654ad
commit 22ceae0149
3 changed files with 7 additions and 3 deletions

View File

@ -12,6 +12,8 @@ PlatformIO 3.0
``debug`` target using `platformio run <https://docs.platformio.org/page/userguide/cmd_run.html>`__ command or `targets <http://docs.platformio.org/page/projectconf/section_env_general.html#targets>`__ option in ``platformio.ini``.
The last option allows to avoid project rebuilding between "Run/Debug" modes.
(`issue #1833 <https://github.com/platformio/platformio-core/issues/1833>`_)
* Do not re-create ".gitignore" and ".travis.yml" files if they were removed
from a project
3.6.0 (2018-08-06)
~~~~~~~~~~~~~~~~~~

View File

@ -138,6 +138,8 @@ def init_base_project(project_dir):
copyfile(
join(util.get_source_dir(), "projectconftpl.ini"),
join(project_dir, "platformio.ini"))
init_ci_conf(project_dir)
init_cvs_ignore(project_dir)
with util.cd(project_dir):
lib_dir = util.get_projectlib_dir()
@ -147,8 +149,6 @@ def init_base_project(project_dir):
makedirs(d)
init_lib_readme(lib_dir)
init_ci_conf(project_dir)
init_cvs_ignore(project_dir)
def init_lib_readme(lib_dir):

View File

@ -130,7 +130,9 @@ class ProjectGenerator(object):
file_name = basename(dst_path)
# merge .gitignore
if file_name == ".gitignore" and isfile(dst_path):
if file_name == ".gitignore":
if not isfile(dst_path):
return
modified = False
default = [l.strip() for l in contents.split("\n")]
with open(dst_path) as fp: