agent version tracking

This commit is contained in:
Graham McIntire 2026-01-30 17:25:08 -06:00
parent c3e6e8c5b0
commit bf1c6314cb
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View file

@ -161,7 +161,7 @@ impl Scheduler {
.unwrap_or_else(|| "unknown".to_string());
let metadata = HeartbeatMetadata {
version: env!("CARGO_PKG_VERSION").to_string(),
version: crate::version::current_version().to_string(),
hostname,
uptime_seconds: uptime,
};

View file

@ -1,5 +1,5 @@
// Get version at runtime - prefers BUILD_VERSION from build.rs, falls back to Cargo.toml
fn current_version() -> &'static str {
/// Get version at runtime - prefers BUILD_VERSION from build.rs, falls back to Cargo.toml
pub fn current_version() -> &'static str {
option_env!("BUILD_VERSION").unwrap_or(env!("CARGO_PKG_VERSION"))
}