1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2026 Fábio Henrique de Lima Silva (fhl.bsb@gmail.com) All rights reserved.
//! Binary CLI utility that emits the golden generation catalog from Rust.
//!
//! The golden registry lives in `src/testing/catalog.rs::GOLDEN_GEN_CATALOG`
//! (single source of truth). This binary serializes it in
//! the shell line format consumed by `tests/fixtures/golden_gen_build.sh`,
//! which previously carried the same data as a static bash `CATALOG=(...)`
//! array. Model lists are therefore never duplicated in shell scripts.
//!
//! Output modes:
//! - `emit-catalog`: prints one catalog line per registry entry
//! (`nam_file:golden_name:label:v2_scope[:skip_srs[:skip_reason]]`) to stdout.
//!
//! Exit codes:
//! - 0: catalog emitted successfully
//! - 2: unknown or missing subcommand
use exit;
use golden_gen_catalog_lines;