Skip to content

Commit ec6f4fa

Browse files
j-piaseckifacebook-github-bot
authored andcommitted
Add option to generate a single snapshot view from CLI (facebook#56071)
Summary: Changelog: [Internal] Adds `--view` argument to the snapshot generator, which allows to generate a single snapshot view instead of all of them. Differential Revision: D96280524
1 parent b9f1e5e commit ec6f4fa

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

scripts/cxx-api/parser/__main__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,11 @@ def main():
198198
type=str,
199199
help="Directory containing committed snapshots for comparison (used with --check)",
200200
)
201+
parser.add_argument(
202+
"--view",
203+
type=str,
204+
help="Name of the API view to generate",
205+
)
201206
parser.add_argument(
202207
"--test",
203208
action="store_true",
@@ -250,6 +255,9 @@ def main():
250255
def build_snapshots(output_dir: str, verbose: bool) -> None:
251256
if not args.test:
252257
for config in snapshot_configs:
258+
if args.view and config.snapshot_name != args.view:
259+
continue
260+
253261
build_snapshot_for_view(
254262
api_view=config.snapshot_name,
255263
react_native_dir=react_native_package_dir,

0 commit comments

Comments
 (0)