Print a building mode

This commit is contained in:
Ivan Kravets
2019-11-03 22:22:40 +02:00
parent 484ea15959
commit e57871cab7
2 changed files with 8 additions and 3 deletions

View File

@ -132,7 +132,10 @@ if env.GetOption("clean"):
env.PioClean(env.subst("$BUILD_DIR"))
env.Exit(0)
elif not int(ARGUMENTS.get("PIOVERBOSE", 0)):
print("Verbose mode can be enabled via `-v, --verbose` option")
click.echo("Verbose mode can be enabled via `-v, --verbose` option")
if not isdir(env.subst("$BUILD_DIR")):
makedirs(env.subst("$BUILD_DIR"))
env.LoadProjectOptions()
env.LoadPioPlatform()
@ -181,12 +184,12 @@ AlwaysBuild(env.Alias("__test", DEFAULT_TARGETS))
##############################################################################
if "envdump" in COMMAND_LINE_TARGETS:
print(env.Dump())
click.echo(env.Dump())
env.Exit(0)
if "idedata" in COMMAND_LINE_TARGETS:
Import("projenv")
print(
click.echo(
"\n%s\n"
% dump_json_to_unicode(
projenv.DumpIDEData() # pylint: disable=undefined-variable

View File

@ -151,6 +151,8 @@ def BuildProgram(env):
)
)
print("Building in %s mode" % env.GetProjectOption("build_type"))
return program