diff --git a/src/commands/install.rs b/src/commands/install.rs index ccdde6e1..d3b5463d 100644 --- a/src/commands/install.rs +++ b/src/commands/install.rs @@ -333,6 +333,10 @@ fn target_installation( target: config.target().to_string(), }, installed_at: chrono::Utc::now().timestamp(), + midenup_version: Some( + semver::Version::parse(env!("CARGO_PKG_VERSION")) + .expect("CARGO_PKG_VERSION is always valid semver"), + ), }) } diff --git a/src/migrate_v1.rs b/src/migrate_v1.rs index b9f705f9..94db0dc6 100644 --- a/src/migrate_v1.rs +++ b/src/migrate_v1.rs @@ -177,6 +177,7 @@ pub fn migrate_if_needed(home: &Path) -> Result, } impl Installation { diff --git a/src/state/mod.rs b/src/state/mod.rs index d0d1ef90..dc6ac909 100644 --- a/src/state/mod.rs +++ b/src/state/mod.rs @@ -181,6 +181,7 @@ mod tests { target: "aarch64-apple-darwin".to_string(), }, installed_at: 1735689600, + midenup_version: None, }], } }