build: Add clap_complete, libc dependencies and git hash build script

Add clap_complete for shell completion generation and libc (unix-only)
for SIGPIPE handling. Create build.rs to embed the git commit hash at
compile time via cargo:rustc-env=GIT_HASH, enabling `lore version` to
display the short hash alongside the version number.

Co-Authored-By: Claude (us.anthropic.claude-opus-4-5-20251101-v1:0) <noreply@anthropic.com>
This commit is contained in:
Taylor Eernisse
2026-01-30 16:53:51 -05:00
parent 41d20f1374
commit 5508d8464a
3 changed files with 25 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ serde_json = "1"
# CLI
clap = { version = "4", features = ["derive", "env"] }
clap_complete = "4"
dialoguer = "0.12"
console = "0.16"
indicatif = "0.18"
@@ -46,6 +47,9 @@ flate2 = "1"
chrono = { version = "0.4", features = ["serde"] }
uuid = { version = "1", features = ["v4"] }
[target.'cfg(unix)'.dependencies]
libc = "0.2"
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }