mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Don't recreate git ignore and travis configs when project is already inited
This commit is contained in:
@ -87,6 +87,7 @@ def cli(
|
|||||||
click.echo("%s - Project Configuration File" % click.style(
|
click.echo("%s - Project Configuration File" % click.style(
|
||||||
"platformio.ini", fg="cyan"))
|
"platformio.ini", fg="cyan"))
|
||||||
|
|
||||||
|
is_new_project = util.is_platformio_project(project_dir)
|
||||||
init_base_project(project_dir)
|
init_base_project(project_dir)
|
||||||
|
|
||||||
if board:
|
if board:
|
||||||
@ -100,18 +101,18 @@ def cli(
|
|||||||
pg = ProjectGenerator(project_dir, ide, env_name)
|
pg = ProjectGenerator(project_dir, ide, env_name)
|
||||||
pg.generate()
|
pg.generate()
|
||||||
|
|
||||||
init_ci_conf(project_dir)
|
if is_new_project:
|
||||||
init_cvs_ignore(project_dir)
|
init_ci_conf(project_dir)
|
||||||
|
init_cvs_ignore(project_dir)
|
||||||
|
|
||||||
if silent:
|
if silent:
|
||||||
return
|
return
|
||||||
|
|
||||||
project_inited_before = util.is_platformio_project(project_dir)
|
|
||||||
if ide:
|
if ide:
|
||||||
click.secho(
|
click.secho(
|
||||||
"\nProject has been successfully %s including configuration files "
|
"\nProject has been successfully %s including configuration files "
|
||||||
"for `%s` IDE." %
|
"for `%s` IDE." % ("initialized" if is_new_project else "updated",
|
||||||
("updated" if project_inited_before else "initialized", ide),
|
ide),
|
||||||
fg="green")
|
fg="green")
|
||||||
else:
|
else:
|
||||||
click.secho(
|
click.secho(
|
||||||
@ -121,7 +122,7 @@ def cli(
|
|||||||
"- upload firmware to a target\n"
|
"- upload firmware to a target\n"
|
||||||
"`pio run --target clean` - clean project (remove compiled files)"
|
"`pio run --target clean` - clean project (remove compiled files)"
|
||||||
"\n`pio run --help` - additional information" %
|
"\n`pio run --help` - additional information" %
|
||||||
("updated" if project_inited_before else "initialized"),
|
("initialized" if is_new_project else "updated"),
|
||||||
fg="green")
|
fg="green")
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user