diff --git a/appmgr/Cargo.lock b/appmgr/Cargo.lock index 2fd1ed051..827858433 100644 --- a/appmgr/Cargo.lock +++ b/appmgr/Cargo.lock @@ -35,7 +35,7 @@ dependencies = [ [[package]] name = "appmgr" -version = "0.2.6" +version = "0.2.7" dependencies = [ "argonautica", "async-trait", diff --git a/appmgr/Cargo.toml b/appmgr/Cargo.toml index a977f7fdd..d7a3590c1 100644 --- a/appmgr/Cargo.toml +++ b/appmgr/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "appmgr" -version = "0.2.6" +version = "0.2.7" authors = ["Aiden McClelland "] edition = "2018" diff --git a/appmgr/src/version/mod.rs b/appmgr/src/version/mod.rs index abe170a79..71de1bbb9 100644 --- a/appmgr/src/version/mod.rs +++ b/appmgr/src/version/mod.rs @@ -21,8 +21,9 @@ mod v0_2_3; mod v0_2_4; mod v0_2_5; mod v0_2_6; +mod v0_2_7; -pub use v0_2_6::Version as Current; +pub use v0_2_7::Version as Current; #[derive(serde::Serialize, serde::Deserialize)] #[serde(untagged)] @@ -41,6 +42,7 @@ enum Version { V0_2_4(Wrapper), V0_2_5(Wrapper), V0_2_6(Wrapper), + V0_2_7(Wrapper), Other(emver::Version), } @@ -149,6 +151,7 @@ pub async fn init() -> Result<(), failure::Error> { Version::V0_2_4(v) => v.0.migrate_to(&Current::new()).await?, Version::V0_2_5(v) => v.0.migrate_to(&Current::new()).await?, Version::V0_2_6(v) => v.0.migrate_to(&Current::new()).await?, + Version::V0_2_7(v) => v.0.migrate_to(&Current::new()).await?, Version::Other(_) => (), // TODO find some way to automate this? } @@ -235,6 +238,7 @@ pub async fn self_update(requirement: emver::VersionRange) -> Result<(), Error> Version::V0_2_4(v) => Current::new().migrate_to(&v.0).await?, Version::V0_2_5(v) => Current::new().migrate_to(&v.0).await?, Version::V0_2_6(v) => Current::new().migrate_to(&v.0).await?, + Version::V0_2_7(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_7.rs b/appmgr/src/version/v0_2_7.rs new file mode 100644 index 000000000..663d6faf1 --- /dev/null +++ b/appmgr/src/version/v0_2_7.rs @@ -0,0 +1,21 @@ +use super::*; + +const V0_2_7: emver::Version = emver::Version::new(0, 2, 7, 0); + +pub struct Version; +#[async_trait] +impl VersionT for Version { + type Previous = v0_2_6::Version; + fn new() -> Self { + Version + } + fn semver(&self) -> &'static emver::Version { + &V0_2_7 + } + async fn up(&self) -> Result<(), Error> { + Ok(()) + } + async fn down(&self) -> Result<(), Error> { + Ok(()) + } +}