agent version tracking
This commit is contained in:
parent
c3e6e8c5b0
commit
bf1c6314cb
2 changed files with 3 additions and 3 deletions
|
|
@ -161,7 +161,7 @@ impl Scheduler {
|
||||||
.unwrap_or_else(|| "unknown".to_string());
|
.unwrap_or_else(|| "unknown".to_string());
|
||||||
|
|
||||||
let metadata = HeartbeatMetadata {
|
let metadata = HeartbeatMetadata {
|
||||||
version: env!("CARGO_PKG_VERSION").to_string(),
|
version: crate::version::current_version().to_string(),
|
||||||
hostname,
|
hostname,
|
||||||
uptime_seconds: uptime,
|
uptime_seconds: uptime,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// Get version at runtime - prefers BUILD_VERSION from build.rs, falls back to Cargo.toml
|
/// Get version at runtime - prefers BUILD_VERSION from build.rs, falls back to Cargo.toml
|
||||||
fn current_version() -> &'static str {
|
pub fn current_version() -> &'static str {
|
||||||
option_env!("BUILD_VERSION").unwrap_or(env!("CARGO_PKG_VERSION"))
|
option_env!("BUILD_VERSION").unwrap_or(env!("CARGO_PKG_VERSION"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue