Skip to content

[distribution] Add --version flag and embed build metadata in the CLI binary #313

Description

@Gbangbolaoluwagbemiga

Context

sanctifier --version currently prints the Cargo package version but no build information. Debugging production issues requires knowing the exact commit, build date, and target.

What to build

Use vergen or a build.rs script to embed:

sanctifier 0.1.0
Commit: abc1234 (2026-03-23)
Target: x86_64-unknown-linux-gnu
Built with: rustc 1.76.0

Acceptance criteria

  • sanctifier --version prints version + commit SHA + build date
  • JSON output includes "sanctifier_version" field in every report
  • build.rs checks at compile time that CARGO_PKG_VERSION matches a semver tag pattern

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions