mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
premake 5 versions
This commit is contained in:
@@ -16,8 +16,13 @@ mod v0_3_5_2;
|
||||
mod v0_3_6_alpha_0;
|
||||
mod v0_3_6_alpha_1;
|
||||
mod v0_3_6_alpha_2;
|
||||
mod v0_3_6_alpha_3;
|
||||
mod v0_3_6_alpha_4;
|
||||
mod v0_3_6_alpha_5;
|
||||
mod v0_3_6_alpha_6;
|
||||
mod v0_3_6_alpha_7;
|
||||
|
||||
pub type Current = v0_3_6_alpha_2::Version;
|
||||
pub type Current = v0_3_6_alpha_2::Version; // VERSION_BUMP
|
||||
|
||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
|
||||
#[serde(untagged)]
|
||||
@@ -30,6 +35,11 @@ enum Version {
|
||||
V0_3_6_alpha_0(Wrapper<v0_3_6_alpha_0::Version>),
|
||||
V0_3_6_alpha_1(Wrapper<v0_3_6_alpha_1::Version>),
|
||||
V0_3_6_alpha_2(Wrapper<v0_3_6_alpha_2::Version>),
|
||||
V0_3_6_alpha_3(Wrapper<v0_3_6_alpha_3::Version>),
|
||||
V0_3_6_alpha_4(Wrapper<v0_3_6_alpha_4::Version>),
|
||||
V0_3_6_alpha_5(Wrapper<v0_3_6_alpha_5::Version>),
|
||||
V0_3_6_alpha_6(Wrapper<v0_3_6_alpha_6::Version>),
|
||||
V0_3_6_alpha_7(Wrapper<v0_3_6_alpha_7::Version>),
|
||||
Other(exver::Version),
|
||||
}
|
||||
|
||||
@@ -52,6 +62,11 @@ impl Version {
|
||||
Version::V0_3_6_alpha_0(Wrapper(x)) => x.semver(),
|
||||
Version::V0_3_6_alpha_1(Wrapper(x)) => x.semver(),
|
||||
Version::V0_3_6_alpha_2(Wrapper(x)) => x.semver(),
|
||||
Version::V0_3_6_alpha_3(Wrapper(x)) => x.semver(),
|
||||
Version::V0_3_6_alpha_4(Wrapper(x)) => x.semver(),
|
||||
Version::V0_3_6_alpha_5(Wrapper(x)) => x.semver(),
|
||||
Version::V0_3_6_alpha_6(Wrapper(x)) => x.semver(),
|
||||
Version::V0_3_6_alpha_7(Wrapper(x)) => x.semver(),
|
||||
Version::Other(x) => x.clone(),
|
||||
}
|
||||
}
|
||||
@@ -254,6 +269,11 @@ pub async fn init(
|
||||
Version::V0_3_6_alpha_0(v) => v.0.migrate_to(&Current::new(), &db, &mut progress).await?,
|
||||
Version::V0_3_6_alpha_1(v) => v.0.migrate_to(&Current::new(), &db, &mut progress).await?,
|
||||
Version::V0_3_6_alpha_2(v) => v.0.migrate_to(&Current::new(), &db, &mut progress).await?,
|
||||
Version::V0_3_6_alpha_3(v) => v.0.migrate_to(&Current::new(), &db, &mut progress).await?,
|
||||
Version::V0_3_6_alpha_4(v) => v.0.migrate_to(&Current::new(), &db, &mut progress).await?,
|
||||
Version::V0_3_6_alpha_5(v) => v.0.migrate_to(&Current::new(), &db, &mut progress).await?,
|
||||
Version::V0_3_6_alpha_6(v) => v.0.migrate_to(&Current::new(), &db, &mut progress).await?,
|
||||
Version::V0_3_6_alpha_7(v) => v.0.migrate_to(&Current::new(), &db, &mut progress).await?,
|
||||
Version::Other(_) => {
|
||||
return Err(Error::new(
|
||||
eyre!("Cannot downgrade"),
|
||||
|
||||
35
core/startos/src/version/v0_3_6_alpha_3.rs
Normal file
35
core/startos/src/version/v0_3_6_alpha_3.rs
Normal file
@@ -0,0 +1,35 @@
|
||||
use exver::{PreReleaseSegment, VersionRange};
|
||||
|
||||
use super::v0_3_5::V0_3_0_COMPAT;
|
||||
use super::{v0_3_6_alpha_2, VersionT};
|
||||
use crate::db::model::Database;
|
||||
use crate::prelude::*;
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
static ref V0_3_6_alpha_3: exver::Version = exver::Version::new(
|
||||
[0, 3, 6],
|
||||
[PreReleaseSegment::String("alpha".into()), 3.into()]
|
||||
);
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Version;
|
||||
|
||||
impl VersionT for Version {
|
||||
type Previous = v0_3_6_alpha_2::Version;
|
||||
fn new() -> Self {
|
||||
Version
|
||||
}
|
||||
fn semver(&self) -> exver::Version {
|
||||
V0_3_6_alpha_3.clone()
|
||||
}
|
||||
fn compat(&self) -> &'static VersionRange {
|
||||
&V0_3_0_COMPAT
|
||||
}
|
||||
async fn up(&self, _db: &TypedPatchDb<Database>) -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
async fn down(&self, _db: &TypedPatchDb<Database>) -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
35
core/startos/src/version/v0_3_6_alpha_4.rs
Normal file
35
core/startos/src/version/v0_3_6_alpha_4.rs
Normal file
@@ -0,0 +1,35 @@
|
||||
use exver::{PreReleaseSegment, VersionRange};
|
||||
|
||||
use super::v0_3_5::V0_3_0_COMPAT;
|
||||
use super::{v0_3_6_alpha_3, VersionT};
|
||||
use crate::db::model::Database;
|
||||
use crate::prelude::*;
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
static ref V0_3_6_alpha_4: exver::Version = exver::Version::new(
|
||||
[0, 3, 6],
|
||||
[PreReleaseSegment::String("alpha".into()), 4.into()]
|
||||
);
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Version;
|
||||
|
||||
impl VersionT for Version {
|
||||
type Previous = v0_3_6_alpha_3::Version;
|
||||
fn new() -> Self {
|
||||
Version
|
||||
}
|
||||
fn semver(&self) -> exver::Version {
|
||||
V0_3_6_alpha_4.clone()
|
||||
}
|
||||
fn compat(&self) -> &'static VersionRange {
|
||||
&V0_3_0_COMPAT
|
||||
}
|
||||
async fn up(&self, _db: &TypedPatchDb<Database>) -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
async fn down(&self, _db: &TypedPatchDb<Database>) -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
35
core/startos/src/version/v0_3_6_alpha_5.rs
Normal file
35
core/startos/src/version/v0_3_6_alpha_5.rs
Normal file
@@ -0,0 +1,35 @@
|
||||
use exver::{PreReleaseSegment, VersionRange};
|
||||
|
||||
use super::v0_3_5::V0_3_0_COMPAT;
|
||||
use super::{v0_3_6_alpha_4, VersionT};
|
||||
use crate::db::model::Database;
|
||||
use crate::prelude::*;
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
static ref V0_3_6_alpha_5: exver::Version = exver::Version::new(
|
||||
[0, 3, 6],
|
||||
[PreReleaseSegment::String("alpha".into()), 5.into()]
|
||||
);
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Version;
|
||||
|
||||
impl VersionT for Version {
|
||||
type Previous = v0_3_6_alpha_4::Version;
|
||||
fn new() -> Self {
|
||||
Version
|
||||
}
|
||||
fn semver(&self) -> exver::Version {
|
||||
V0_3_6_alpha_5.clone()
|
||||
}
|
||||
fn compat(&self) -> &'static VersionRange {
|
||||
&V0_3_0_COMPAT
|
||||
}
|
||||
async fn up(&self, _db: &TypedPatchDb<Database>) -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
async fn down(&self, _db: &TypedPatchDb<Database>) -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
35
core/startos/src/version/v0_3_6_alpha_6.rs
Normal file
35
core/startos/src/version/v0_3_6_alpha_6.rs
Normal file
@@ -0,0 +1,35 @@
|
||||
use exver::{PreReleaseSegment, VersionRange};
|
||||
|
||||
use super::v0_3_5::V0_3_0_COMPAT;
|
||||
use super::{v0_3_6_alpha_5, VersionT};
|
||||
use crate::db::model::Database;
|
||||
use crate::prelude::*;
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
static ref V0_3_6_alpha_6: exver::Version = exver::Version::new(
|
||||
[0, 3, 6],
|
||||
[PreReleaseSegment::String("alpha".into()), 6.into()]
|
||||
);
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Version;
|
||||
|
||||
impl VersionT for Version {
|
||||
type Previous = v0_3_6_alpha_5::Version;
|
||||
fn new() -> Self {
|
||||
Version
|
||||
}
|
||||
fn semver(&self) -> exver::Version {
|
||||
V0_3_6_alpha_6.clone()
|
||||
}
|
||||
fn compat(&self) -> &'static VersionRange {
|
||||
&V0_3_0_COMPAT
|
||||
}
|
||||
async fn up(&self, _db: &TypedPatchDb<Database>) -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
async fn down(&self, _db: &TypedPatchDb<Database>) -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
35
core/startos/src/version/v0_3_6_alpha_7.rs
Normal file
35
core/startos/src/version/v0_3_6_alpha_7.rs
Normal file
@@ -0,0 +1,35 @@
|
||||
use exver::{PreReleaseSegment, VersionRange};
|
||||
|
||||
use super::v0_3_5::V0_3_0_COMPAT;
|
||||
use super::{v0_3_6_alpha_6, VersionT};
|
||||
use crate::db::model::Database;
|
||||
use crate::prelude::*;
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
static ref V0_3_6_alpha_7: exver::Version = exver::Version::new(
|
||||
[0, 3, 6],
|
||||
[PreReleaseSegment::String("alpha".into()), 7.into()]
|
||||
);
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Version;
|
||||
|
||||
impl VersionT for Version {
|
||||
type Previous = v0_3_6_alpha_6::Version;
|
||||
fn new() -> Self {
|
||||
Version
|
||||
}
|
||||
fn semver(&self) -> exver::Version {
|
||||
V0_3_6_alpha_7.clone()
|
||||
}
|
||||
fn compat(&self) -> &'static VersionRange {
|
||||
&V0_3_0_COMPAT
|
||||
}
|
||||
async fn up(&self, _db: &TypedPatchDb<Database>) -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
async fn down(&self, _db: &TypedPatchDb<Database>) -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user