mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-31 10:37:13 +02:00
Remove prompts from init command; Update template for Project Configuration File
This commit is contained in:
2
examples
2
examples
Submodule examples updated: 9b0c8c32cc...4b6ddf4896
@ -77,10 +77,10 @@ def cli(ctx, # pylint: disable=R0913
|
|||||||
fg="yellow")
|
fg="yellow")
|
||||||
click.echo("")
|
click.echo("")
|
||||||
|
|
||||||
click.echo("The next files/directories will be created in %s" %
|
click.echo("The next files/directories have been created in %s" %
|
||||||
click.style(
|
click.style(
|
||||||
project_dir, fg="cyan"))
|
project_dir, fg="cyan"))
|
||||||
click.echo("%s - Project Configuration File. |-> PLEASE EDIT ME <-|" %
|
click.echo("%s - Project Configuration File" %
|
||||||
click.style(
|
click.style(
|
||||||
"platformio.ini", fg="cyan"))
|
"platformio.ini", fg="cyan"))
|
||||||
click.echo("%s - Put your source files here" % click.style(
|
click.echo("%s - Put your source files here" % click.style(
|
||||||
@ -89,10 +89,6 @@ def cli(ctx, # pylint: disable=R0913
|
|||||||
click.style(
|
click.style(
|
||||||
"lib", fg="cyan"))
|
"lib", fg="cyan"))
|
||||||
|
|
||||||
if (app.get_setting("enable_prompts") and
|
|
||||||
not click.confirm("Do you want to continue?")):
|
|
||||||
raise exception.AbortedByUser()
|
|
||||||
|
|
||||||
init_base_project(project_dir)
|
init_base_project(project_dir)
|
||||||
|
|
||||||
if board:
|
if board:
|
||||||
@ -276,10 +272,21 @@ def init_ci_conf(project_dir):
|
|||||||
|
|
||||||
|
|
||||||
def init_cvs_ignore(project_dir):
|
def init_cvs_ignore(project_dir):
|
||||||
if isfile(join(project_dir, ".gitignore")):
|
ignore_path = join(project_dir, ".gitignore")
|
||||||
return
|
default = [
|
||||||
with open(join(project_dir, ".gitignore"), "w") as f:
|
".pioenvs\n",
|
||||||
f.write(".pioenvs")
|
".piolibdeps\n"
|
||||||
|
]
|
||||||
|
current = []
|
||||||
|
if isfile(ignore_path):
|
||||||
|
with open(ignore_path) as fp:
|
||||||
|
current = fp.readlines()
|
||||||
|
print 13, current
|
||||||
|
for d in default:
|
||||||
|
if d not in current:
|
||||||
|
current.append(d)
|
||||||
|
with open(ignore_path, "w") as fp:
|
||||||
|
fp.writelines(current)
|
||||||
|
|
||||||
|
|
||||||
def fill_project_envs( # pylint: disable=too-many-arguments,too-many-locals
|
def fill_project_envs( # pylint: disable=too-many-arguments,too-many-locals
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
#
|
#
|
||||||
# PlatformIO Project Configuration File
|
# PlatformIO Project Configuration File
|
||||||
#
|
#
|
||||||
# Please make sure to read documentation with examples first
|
# Build options: build flags, source filter, extra scripting
|
||||||
|
# Upload options: custom port, speed and extra flags
|
||||||
|
# Library options: dependencies, extra library storages
|
||||||
|
#
|
||||||
|
# Please visit documentation for the other options and examples
|
||||||
# http://docs.platformio.org/en/stable/projectconf.html
|
# http://docs.platformio.org/en/stable/projectconf.html
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user