Replace "idedata" target with "pio project metadata" command

This commit is contained in:
Ivan Kravets
2023-07-15 15:31:01 +03:00
parent 0fe6bf262e
commit 0da1a38df5
3 changed files with 6 additions and 3 deletions

View File

@ -229,7 +229,10 @@ if env.IsIntegrationDump():
encoding="utf8",
) as fp:
json.dump(data, fp)
click.echo("\n%s\n" % json.dumps(data)) # pylint: disable=undefined-variable
click.echo(
"Data has been saved to the following location %s"
% projenv.subst(os.path.join("$BUILD_DIR", "idedata.json"))
)
env.Exit(0)
if "sizedata" in COMMAND_LINE_TARGETS:

View File

@ -23,7 +23,7 @@ from platformio.proc import exec_command, where_is_program
def IsIntegrationDump(_):
return set(["__idedata", "idedata"]) & set(COMMAND_LINE_TARGETS)
return "__idedata" in COMMAND_LINE_TARGETS
def DumpIntegrationIncludes(env):

View File

@ -179,7 +179,7 @@ def _load_build_metadata(project_dir, env_names, debug=False):
result.exception, exception.ReturnErrorCode
):
raise result.exception
if '"includes":' not in result.output:
if "Data has been saved to the following location" not in result.output:
raise exception.UserSideException(result.output)
return _get_cached_build_metadata(project_dir, env_names)