mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
bump version for 0.3.0.1 (#1353)
* bump version for 0.3.0.1 * fix mock versioning * update welcome message * remove old release note Co-authored-by: Lucy Cifferello <12953208+elvece@users.noreply.github.com>
This commit is contained in:
@@ -9,13 +9,15 @@ use rpc_toolkit::command;
|
||||
use crate::{Error, ResultExt};
|
||||
|
||||
mod v0_3_0;
|
||||
mod v0_3_0_1;
|
||||
|
||||
pub type Current = v0_3_0::Version;
|
||||
pub type Current = v0_3_0_1::Version;
|
||||
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[serde(untagged)]
|
||||
enum Version {
|
||||
V0_3_0(Wrapper<v0_3_0::Version>),
|
||||
V0_3_0_1(Wrapper<v0_3_0_1::Version>),
|
||||
Other(emver::Version),
|
||||
}
|
||||
|
||||
@@ -111,6 +113,7 @@ pub async fn init<Db: DbHandle>(db: &mut Db) -> Result<(), Error> {
|
||||
let version: Version = db.get(&ptr).await?;
|
||||
match version {
|
||||
Version::V0_3_0(v) => v.0.migrate_to(&Current::new(), db).await?,
|
||||
Version::V0_3_0_1(v) => v.0.migrate_to(&Current::new(), db).await?,
|
||||
Version::Other(_) => {
|
||||
return Err(Error::new(
|
||||
eyre!("Cannot downgrade"),
|
||||
|
||||
@@ -5,7 +5,7 @@ use super::*;
|
||||
|
||||
const V0_3_0: emver::Version = emver::Version::new(0, 3, 0, 0);
|
||||
lazy_static! {
|
||||
static ref V0_3_0_COMPAT: VersionRange = VersionRange::Conj(
|
||||
pub static ref V0_3_0_COMPAT: VersionRange = VersionRange::Conj(
|
||||
Box::new(VersionRange::Anchor(
|
||||
emver::GTE,
|
||||
emver::Version::new(0, 3, 0, 0),
|
||||
|
||||
26
backend/src/version/v0_3_0_1.rs
Normal file
26
backend/src/version/v0_3_0_1.rs
Normal file
@@ -0,0 +1,26 @@
|
||||
use emver::VersionRange;
|
||||
|
||||
use super::*;
|
||||
|
||||
const V0_3_0_1: emver::Version = emver::Version::new(0, 3, 0, 1);
|
||||
|
||||
pub struct Version;
|
||||
#[async_trait]
|
||||
impl VersionT for Version {
|
||||
type Previous = v0_3_0::Version;
|
||||
fn new() -> Self {
|
||||
Version
|
||||
}
|
||||
fn semver(&self) -> emver::Version {
|
||||
V0_3_0_1
|
||||
}
|
||||
fn compat(&self) -> &'static VersionRange {
|
||||
&*v0_3_0::V0_3_0_COMPAT
|
||||
}
|
||||
async fn up<Db: DbHandle>(&self, _db: &mut Db) -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
async fn down<Db: DbHandle>(&self, _db: &mut Db) -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user