claw-code/rust/crates/rusty-claude-cli/src
Jobdori 275b58546d feat(cli): populate Git SHA, target triple, and build date at compile time via build.rs
Add rust/crates/rusty-claude-cli/build.rs that:
- Captures git rev-parse --short HEAD at build time → GIT_SHA env
- Reads Cargo's TARGET env var → TARGET env
- Derives BUILD_DATE from SOURCE_DATE_EPOCH / BUILD_DATE env or
  the current date via `date +%Y-%m-%d` fallback
- Registers rerun-if-changed on .git/HEAD and .git/refs so the SHA
  stays fresh across commits

Update main.rs DEFAULT_DATE to pick up BUILD_DATE from option_env!()
instead of the hardcoded 2026-03-31 static string.

Before: `claw --version` always showed Git SHA: unknown, Target: unknown,
Build date: 2026-03-31 in local builds.
After:  e.g. Git SHA: 7f53d82, Target: aarch64-apple-darwin, Build date: 2026-04-08

Generated by droid (Kimi K2.5 Turbo) via acpx (wrote build.rs),
cleaned up by Jobdori (added BUILD_DATE step, updated main.rs const).

Co-Authored-By: Droid <noreply@factory.ai>
2026-04-08 18:11:46 +09:00
..
init.rs Make .claw the only user-facing config namespace 2026-04-05 18:11:25 +00:00
input.rs Reduce REPL overhead for orchestration-heavy workflows 2026-04-02 07:19:14 +00:00
main.rs feat(cli): populate Git SHA, target triple, and build date at compile time via build.rs 2026-04-08 18:11:46 +09:00
render.rs feat: b5-context-compress — batch 5 wave 2 2026-04-07 15:19:45 +09:00