Skip to content

Commit

Permalink
Update documentation for regenerating a single app's files. (#9266)
Browse files Browse the repository at this point in the history
Also adds logging to zap_regen_all.py so it shows exactly what command
it's running for every target it generates.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Sep 13, 2021
1 parent 5249400 commit 828a186
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
4 changes: 3 additions & 1 deletion scripts/tools/zap_regen_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__':
Expand Down
18 changes: 9 additions & 9 deletions src/app/zap-templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <path to application *.zap file>
./scripts/tools/zap/generate.py <path to application *.zap file> -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
Expand Down

0 comments on commit 828a186

Please sign in to comment.