Skip to content

feat(cli): consolidate --help and --version in all binaries - #5

Open
rodonile wants to merge 1 commit into
yang-consumer-crate-buildfrom
cli-consolidate
Open

feat(cli): consolidate --help and --version in all binaries#5
rodonile wants to merge 1 commit into
yang-consumer-crate-buildfrom
cli-consolidate

Conversation

@rodonile

Copy link
Copy Markdown
Owner

Summary

Adds consistent, detailed --version / -V output across the CLI binaries
(pcap-decoder, collector, yang-consumer), showing commit hash/date,
branch/tag, build time, Rust toolchain, and OS.

Changes

  • pcap-decoder: added build.rs + shadow-rs build-dependency (mirrors
    collector/yang-consumer setup) and a custom version_info() used for
    --version.
  • collector: replaced the manual -v/--version boolean flag and
    early-exit branch with clap's built-in ArgAction::Version (-V), which
    lets --version run without requiring config_file to be provided.
  • yang-consumer: switched from clap's default #[command(version)] to
    the same custom multi-line version_info() used elsewhere.

@rodonile
rodonile force-pushed the yang-consumer-crate-build branch from 5c8a49b to f229654 Compare August 20, 2026 08:48
@rodonile
rodonile force-pushed the yang-consumer-crate-build branch from f229654 to b852768 Compare August 21, 2026 07:44
Add build.rs/shadow-rs wiring to pcap-decoder so `--version` prints
commit, branch, build time, rustc and OS info like collector and
yang-consumer. Also switch collector and yang-consumer to clap's
native ArgAction::Version (-V) so --version works without requiring
other positional/required args.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant