mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
0.2.6
This commit is contained in:
2
appmgr/Cargo.lock
generated
2
appmgr/Cargo.lock
generated
@@ -35,7 +35,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "appmgr"
|
||||
version = "0.2.5"
|
||||
version = "0.2.6"
|
||||
dependencies = [
|
||||
"argonautica",
|
||||
"async-trait",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "appmgr"
|
||||
version = "0.2.5"
|
||||
version = "0.2.6"
|
||||
authors = ["Aiden McClelland <me@drbonez.dev>"]
|
||||
edition = "2018"
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ mod v0_2_2;
|
||||
mod v0_2_3;
|
||||
mod v0_2_4;
|
||||
mod v0_2_5;
|
||||
mod v0_2_6;
|
||||
|
||||
pub use v0_2_5::Version as Current;
|
||||
|
||||
@@ -39,6 +40,7 @@ enum Version {
|
||||
V0_2_3(Wrapper<v0_2_3::Version>),
|
||||
V0_2_4(Wrapper<v0_2_4::Version>),
|
||||
V0_2_5(Wrapper<v0_2_5::Version>),
|
||||
V0_2_6(Wrapper<v0_2_6::Version>),
|
||||
Other(emver::Version),
|
||||
}
|
||||
|
||||
@@ -146,6 +148,7 @@ pub async fn init() -> Result<(), failure::Error> {
|
||||
Version::V0_2_3(v) => v.0.migrate_to(&Current::new()).await?,
|
||||
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::Other(_) => (),
|
||||
// TODO find some way to automate this?
|
||||
}
|
||||
@@ -231,6 +234,7 @@ pub async fn self_update(requirement: emver::VersionRange) -> Result<(), Error>
|
||||
Version::V0_2_3(v) => Current::new().migrate_to(&v.0).await?,
|
||||
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::Other(_) => (),
|
||||
// TODO find some way to automate this?
|
||||
};
|
||||
|
||||
21
appmgr/src/version/v0_2_6.rs
Normal file
21
appmgr/src/version/v0_2_6.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
use super::*;
|
||||
|
||||
const V0_2_6: emver::Version = emver::Version::new(0, 2, 6, 0);
|
||||
|
||||
pub struct Version;
|
||||
#[async_trait]
|
||||
impl VersionT for Version {
|
||||
type Previous = v0_2_5::Version;
|
||||
fn new() -> Self {
|
||||
Version
|
||||
}
|
||||
fn semver(&self) -> &'static emver::Version {
|
||||
&V0_2_6
|
||||
}
|
||||
async fn up(&self) -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
async fn down(&self) -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user