From 5b3163465df39ce52750eb0552b775e5aa657b70 Mon Sep 17 00:00:00 2001 From: Keagan McClelland Date: Tue, 13 Jul 2021 12:25:14 -0600 Subject: [PATCH] updates appmgr to 0.2.14 ceremonial --- appmgr/Cargo.lock | 2 +- appmgr/Cargo.toml | 6 ++++-- appmgr/src/version/mod.rs | 6 +++++- appmgr/src/version/v0_2_14.rs | 21 +++++++++++++++++++++ 4 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 appmgr/src/version/v0_2_14.rs diff --git a/appmgr/Cargo.lock b/appmgr/Cargo.lock index b406d98c3..669782442 100644 --- a/appmgr/Cargo.lock +++ b/appmgr/Cargo.lock @@ -41,7 +41,7 @@ checksum = "afddf7f520a80dbf76e6f50a35bca42a2331ef227a28b3b6dc5c2e2338d114b1" [[package]] name = "appmgr" -version = "0.2.13" +version = "0.2.14" dependencies = [ "async-trait", "avahi-sys", diff --git a/appmgr/Cargo.toml b/appmgr/Cargo.toml index 63ed6ea28..a10ea0b6e 100644 --- a/appmgr/Cargo.toml +++ b/appmgr/Cargo.toml @@ -2,7 +2,7 @@ authors = ["Aiden McClelland "] edition = "2018" name = "appmgr" -version = "0.2.13" +version = "0.2.14" [lib] name = "appmgrlib" @@ -20,7 +20,9 @@ production = [] [dependencies] async-trait = "0.1.42" -avahi-sys = { git = "https://github.com/Start9Labs/avahi-sys", branch = "feature/dynamic-linking", features = ["dynamic"], optional = true } +avahi-sys = { git = "https://github.com/Start9Labs/avahi-sys", branch = "feature/dynamic-linking", features = [ + "dynamic", +], optional = true } base32 = "0.4.0" clap = "2.33" ctrlc = "3.1.7" diff --git a/appmgr/src/version/mod.rs b/appmgr/src/version/mod.rs index 568f76d5a..322bc690b 100644 --- a/appmgr/src/version/mod.rs +++ b/appmgr/src/version/mod.rs @@ -30,8 +30,9 @@ mod v0_2_10; mod v0_2_11; mod v0_2_12; mod v0_2_13; +mod v0_2_14; -pub use v0_2_13::Version as Current; +pub use v0_2_14::Version as Current; #[derive(serde::Serialize, serde::Deserialize)] #[serde(untagged)] @@ -57,6 +58,7 @@ enum Version { V0_2_11(Wrapper), V0_2_12(Wrapper), V0_2_13(Wrapper), + V0_2_14(Wrapper), Other(emver::Version), } @@ -172,6 +174,7 @@ pub async fn init() -> Result<(), failure::Error> { Version::V0_2_11(v) => v.0.migrate_to(&Current::new()).await?, Version::V0_2_12(v) => v.0.migrate_to(&Current::new()).await?, Version::V0_2_13(v) => v.0.migrate_to(&Current::new()).await?, + Version::V0_2_14(v) => v.0.migrate_to(&Current::new()).await?, Version::Other(_) => (), // TODO find some way to automate this? } @@ -266,6 +269,7 @@ pub async fn self_update(requirement: emver::VersionRange) -> Result<(), Error> Version::V0_2_11(v) => Current::new().migrate_to(&v.0).await?, Version::V0_2_12(v) => Current::new().migrate_to(&v.0).await?, Version::V0_2_13(v) => Current::new().migrate_to(&v.0).await?, + Version::V0_2_14(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_14.rs b/appmgr/src/version/v0_2_14.rs new file mode 100644 index 000000000..cb5e4c04c --- /dev/null +++ b/appmgr/src/version/v0_2_14.rs @@ -0,0 +1,21 @@ +use super::*; + +const V0_2_14: emver::Version = emver::Version::new(0, 2, 14, 0); + +pub struct Version; +#[async_trait] +impl VersionT for Version { + type Previous = v0_2_13::Version; + fn new() -> Self { + Version + } + fn semver(&self) -> &'static emver::Version { + &V0_2_14 + } + async fn up(&self) -> Result<(), Error> { + Ok(()) + } + async fn down(&self) -> Result<(), Error> { + Ok(()) + } +}