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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! Shared version constants for kanban binaries.
//!
//! Three consts, two pieces of information:
//! - [`KANBAN_VERSION`] / [`KANBAN_COMMIT`] are the raw components, consumed by
//! the persistence layer when stamping a file's writer identity.
//! - [`CLI_VERSION_DISPLAY`] is the multi-line string clap renders for
//! `--version`. It looks like `"0.6.0\ncommit: 18e98c4..."`.
//!
//! The redundancy is structural: Rust's `concat!` only accepts literal
//! expressions, so it must read the env vars directly rather than reuse the
//! component consts. Moving the concat into the binary crates would require
//! either duplicating `build.rs` (no thanks) or runtime `Box::leak` (worse).
/// Semver-style version of the kanban crate that produced this binary.
/// Stamped into persistence metadata so a file remembers which kanban wrote it.
pub const KANBAN_VERSION: &str = env!;
/// Git commit hash of the kanban build that produced this binary.
/// Resolves to `"unknown"` when built outside a git checkout.
pub const KANBAN_COMMIT: &str = env!;
/// Multi-line display string passed to clap's `version = ...` attribute on the
/// `kanban` and `kanban-mcp` binaries. Renders as
/// `"{KANBAN_VERSION}\ncommit: {KANBAN_COMMIT}"` when a git commit is
/// available, falling back to bare `KANBAN_VERSION` otherwise.
pub const CLI_VERSION_DISPLAY: &str = concat!;
pub const CLI_VERSION_DISPLAY: &str = env!;