From 828a186ee87fcfebc84c4611563a286411673259 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 31 Aug 2021 13:18:07 -0400 Subject: [PATCH] Update documentation for regenerating a single app's files. (#9266) Also adds logging to zap_regen_all.py so it shows exactly what command it's running for every target it generates. --- scripts/tools/zap_regen_all.py | 4 +++- src/app/zap-templates/README.md | 18 +++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/scripts/tools/zap_regen_all.py b/scripts/tools/zap_regen_all.py index 978f76b3c76d4f..a6439426f1a810 100755 --- a/scripts/tools/zap_regen_all.py +++ b/scripts/tools/zap_regen_all.py @@ -103,7 +103,9 @@ def main(): targets = getTargets() for target in targets: - subprocess.check_call(['./scripts/tools/zap/generate.py'] + target) + exec_list = ['./scripts/tools/zap/generate.py'] + target + logging.info("Generating target: %s" % " ".join(exec_list)) + subprocess.check_call(exec_list) if __name__ == '__main__': diff --git a/src/app/zap-templates/README.md b/src/app/zap-templates/README.md index 347e2e28019385..52fc2b6344f26b 100644 --- a/src/app/zap-templates/README.md +++ b/src/app/zap-templates/README.md @@ -31,24 +31,24 @@ need to be updated. You can regenerate all files with: ### How to generate files for a single application -By default generated files are located in a `gen/` folder next to the -application `zap` file that has been created during the application -configuration. +By default generated files are located in a `zap-generated/` folder under +`zzz_generated/app-name/`. -The `gen/` folder content is the output of the templates listed into +The `zap-generated/` folder content is the output of the templates listed into `app-templates.json`. -#### To generate the application `gen/` folder the command is: +#### To generate the application `zap-generated/` folder the command is: ``` -./scripts/tools/zap/generate.py +./scripts/tools/zap/generate.py -o zzz_generated/app-name/zap-generated + ``` -For example, to generate `examples/lighting-app/lighting-common/gen/` folder the -command is: +For example, to generate the `zzz_generated/lighting-app/zap-generated/` folder +the command is: ``` -./scripts/tools/zap/generate.py examples/lighting-app/lighting-common/lighting-app.zap +./scripts/tools/zap/generate.py examples/lighting-app/lighting-common/lighting-app.zap -o zzz_generated/lighting-app/zap-generated ``` ### How to generate files for a single application using custom templates