cuqueclicker_lib/build_info.rs
1/// `CARGO_PKG_VERSION` at compile time. "0.0.0" means a dev build; release
2/// builds have `Cargo.toml` patched from the git tag before compilation.
3pub const VERSION: &str = env!("CARGO_PKG_VERSION");
4
5/// Dev build marker. `release.yml` swaps `Cargo.toml` version before building,
6/// so any binary whose version is still "0.0.0" is an unreleased build.
7pub fn is_dev_build() -> bool {
8 VERSION == "0.0.0"
9}
10
11/// Git branch (or short SHA on detached HEAD) captured by `build.rs` at
12/// compile time. `None` when built outside a git tree — e.g. a crates.io
13/// tarball or a vendored source drop — so release paths don't need special
14/// handling. Used by the HUD to mark dev builds with their source branch.
15pub const GIT_BRANCH: Option<&str> = option_env!("CUQUE_GIT_BRANCH");