diff --git a/appmgr/Cargo.lock b/appmgr/Cargo.lock index 80da3dd9e..1bce4f28c 100644 --- a/appmgr/Cargo.lock +++ b/appmgr/Cargo.lock @@ -41,7 +41,7 @@ checksum = "afddf7f520a80dbf76e6f50a35bca42a2331ef227a28b3b6dc5c2e2338d114b1" [[package]] name = "appmgr" -version = "0.2.10" +version = "0.2.11" dependencies = [ "async-trait", "avahi-sys", diff --git a/appmgr/Cargo.toml b/appmgr/Cargo.toml index e30d84407..fac07d45e 100644 --- a/appmgr/Cargo.toml +++ b/appmgr/Cargo.toml @@ -2,7 +2,7 @@ authors = ["Aiden McClelland "] edition = "2018" name = "appmgr" -version = "0.2.10" +version = "0.2.11" [lib] name = "appmgrlib" diff --git a/appmgr/src/version/mod.rs b/appmgr/src/version/mod.rs index 7c16b4f0e..f8e8c7ce5 100644 --- a/appmgr/src/version/mod.rs +++ b/appmgr/src/version/mod.rs @@ -17,7 +17,6 @@ mod v0_1_4; mod v0_1_5; mod v0_2_0; mod v0_2_1; -mod v0_2_10; mod v0_2_2; mod v0_2_3; mod v0_2_4; @@ -27,7 +26,10 @@ mod v0_2_7; mod v0_2_8; mod v0_2_9; -pub use v0_2_10::Version as Current; +mod v0_2_10; +mod v0_2_11; + +pub use v0_2_11::Version as Current; #[derive(serde::Serialize, serde::Deserialize)] #[serde(untagged)] @@ -50,6 +52,7 @@ enum Version { V0_2_8(Wrapper), V0_2_9(Wrapper), V0_2_10(Wrapper), + V0_2_11(Wrapper), Other(emver::Version), } @@ -162,6 +165,7 @@ pub async fn init() -> Result<(), failure::Error> { Version::V0_2_8(v) => v.0.migrate_to(&Current::new()).await?, Version::V0_2_9(v) => v.0.migrate_to(&Current::new()).await?, Version::V0_2_10(v) => v.0.migrate_to(&Current::new()).await?, + Version::V0_2_11(v) => v.0.migrate_to(&Current::new()).await?, Version::Other(_) => (), // TODO find some way to automate this? } @@ -253,6 +257,7 @@ pub async fn self_update(requirement: emver::VersionRange) -> Result<(), Error> Version::V0_2_8(v) => Current::new().migrate_to(&v.0).await?, Version::V0_2_9(v) => Current::new().migrate_to(&v.0).await?, Version::V0_2_10(v) => Current::new().migrate_to(&v.0).await?, + Version::V0_2_11(v) => Current::new().migrate_to(&v.0).await?, Version::Other(_) => (), // TODO find some way to automate this? }; diff --git a/appmgr/src/version/v0_2_11.rs b/appmgr/src/version/v0_2_11.rs new file mode 100644 index 000000000..b6c298e68 --- /dev/null +++ b/appmgr/src/version/v0_2_11.rs @@ -0,0 +1,21 @@ +use super::*; + +const V0_2_11: emver::Version = emver::Version::new(0, 2, 11, 0); + +pub struct Version; +#[async_trait] +impl VersionT for Version { + type Previous = v0_2_10::Version; + fn new() -> Self { + Version + } + fn semver(&self) -> &'static emver::Version { + &V0_2_11 + } + async fn up(&self) -> Result<(), Error> { + Ok(()) + } + async fn down(&self) -> Result<(), Error> { + Ok(()) + } +}