mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
updates appmgr to 0.2.14 ceremonial
This commit is contained in:
2
appmgr/Cargo.lock
generated
2
appmgr/Cargo.lock
generated
@@ -41,7 +41,7 @@ checksum = "afddf7f520a80dbf76e6f50a35bca42a2331ef227a28b3b6dc5c2e2338d114b1"
|
||||
|
||||
[[package]]
|
||||
name = "appmgr"
|
||||
version = "0.2.13"
|
||||
version = "0.2.14"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"avahi-sys",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
authors = ["Aiden McClelland <me@drbonez.dev>"]
|
||||
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"
|
||||
|
||||
@@ -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_11::Version>),
|
||||
V0_2_12(Wrapper<v0_2_12::Version>),
|
||||
V0_2_13(Wrapper<v0_2_13::Version>),
|
||||
V0_2_14(Wrapper<v0_2_14::Version>),
|
||||
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?
|
||||
};
|
||||
|
||||
21
appmgr/src/version/v0_2_14.rs
Normal file
21
appmgr/src/version/v0_2_14.rs
Normal file
@@ -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(())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user