mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
chore: Initial commit for the bump to 0.3.5.2 (#2541)
* chore: Initial commit for the bump * wip(fix): build * chore: Update the os welcome page to include the previous release of the 0.3.5.1
This commit is contained in:
@@ -15,8 +15,9 @@ mod v0_3_4_3;
|
||||
mod v0_3_4_4;
|
||||
mod v0_3_5;
|
||||
mod v0_3_5_1;
|
||||
mod v0_3_5_2;
|
||||
|
||||
pub type Current = v0_3_5_1::Version;
|
||||
pub type Current = v0_3_5_2::Version;
|
||||
|
||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
|
||||
#[serde(untagged)]
|
||||
@@ -28,6 +29,7 @@ enum Version {
|
||||
V0_3_4_4(Wrapper<v0_3_4_4::Version>),
|
||||
V0_3_5(Wrapper<v0_3_5::Version>),
|
||||
V0_3_5_1(Wrapper<v0_3_5_1::Version>),
|
||||
V0_3_5_2(Wrapper<v0_3_5_2::Version>),
|
||||
Other(emver::Version),
|
||||
}
|
||||
|
||||
@@ -50,6 +52,7 @@ impl Version {
|
||||
Version::V0_3_4_4(Wrapper(x)) => x.semver(),
|
||||
Version::V0_3_5(Wrapper(x)) => x.semver(),
|
||||
Version::V0_3_5_1(Wrapper(x)) => x.semver(),
|
||||
Version::V0_3_5_2(Wrapper(x)) => x.semver(),
|
||||
Version::Other(x) => x.clone(),
|
||||
}
|
||||
}
|
||||
@@ -176,6 +179,7 @@ pub async fn init(db: &PatchDb, secrets: &PgPool) -> Result<(), Error> {
|
||||
Version::V0_3_4_4(v) => v.0.migrate_to(&Current::new(), db.clone(), secrets).await?,
|
||||
Version::V0_3_5(v) => v.0.migrate_to(&Current::new(), db.clone(), secrets).await?,
|
||||
Version::V0_3_5_1(v) => v.0.migrate_to(&Current::new(), db.clone(), secrets).await?,
|
||||
Version::V0_3_5_2(v) => v.0.migrate_to(&Current::new(), db.clone(), secrets).await?,
|
||||
Version::Other(_) => {
|
||||
return Err(Error::new(
|
||||
eyre!("Cannot downgrade"),
|
||||
@@ -215,6 +219,7 @@ mod tests {
|
||||
Just(Version::V0_3_4_4(Wrapper(v0_3_4_4::Version::new()))),
|
||||
Just(Version::V0_3_5(Wrapper(v0_3_5::Version::new()))),
|
||||
Just(Version::V0_3_5_1(Wrapper(v0_3_5_1::Version::new()))),
|
||||
Just(Version::V0_3_5_2(Wrapper(v0_3_5_2::Version::new()))),
|
||||
em_version().prop_map(Version::Other),
|
||||
]
|
||||
}
|
||||
|
||||
32
core/startos/src/version/v0_3_5_2.rs
Normal file
32
core/startos/src/version/v0_3_5_2.rs
Normal file
@@ -0,0 +1,32 @@
|
||||
use async_trait::async_trait;
|
||||
use emver::VersionRange;
|
||||
use sqlx::PgPool;
|
||||
|
||||
use super::VersionT;
|
||||
use super::{v0_3_4::V0_3_0_COMPAT, v0_3_5_1};
|
||||
use crate::prelude::*;
|
||||
|
||||
const V0_3_5_2: emver::Version = emver::Version::new(0, 3, 5, 2);
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Version;
|
||||
|
||||
#[async_trait]
|
||||
impl VersionT for Version {
|
||||
type Previous = v0_3_5_1::Version;
|
||||
fn new() -> Self {
|
||||
Version
|
||||
}
|
||||
fn semver(&self) -> emver::Version {
|
||||
V0_3_5_2
|
||||
}
|
||||
fn compat(&self) -> &'static VersionRange {
|
||||
&V0_3_0_COMPAT
|
||||
}
|
||||
async fn up(&self, _db: PatchDb, _secrets: &PgPool) -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
async fn down(&self, _db: PatchDb, _secrets: &PgPool) -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user