bump version

This commit is contained in:
Aiden McClelland
2024-07-26 20:31:09 -06:00
parent 6f07ec2597
commit 3e7578d670
7 changed files with 48 additions and 6 deletions

View File

@@ -15,8 +15,9 @@ mod v0_3_5_1;
mod v0_3_5_2;
mod v0_3_6_alpha_0;
mod v0_3_6_alpha_1;
mod v0_3_6_alpha_2;
pub type Current = v0_3_6_alpha_1::Version;
pub type Current = v0_3_6_alpha_2::Version;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
#[serde(untagged)]
@@ -28,6 +29,7 @@ enum Version {
V0_3_5_2(Wrapper<v0_3_5_2::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>),
Other(exver::Version),
}
@@ -49,6 +51,7 @@ impl Version {
Version::V0_3_5_2(Wrapper(x)) => x.semver(),
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::Other(x) => x.clone(),
}
}
@@ -250,6 +253,7 @@ pub async fn init(
Version::V0_3_5_2(v) => v.0.migrate_to(&Current::new(), &db, &mut progress).await?,
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::Other(_) => {
return Err(Error::new(
eyre!("Cannot downgrade"),
@@ -300,6 +304,9 @@ mod tests {
Just(Version::V0_3_6_alpha_1(Wrapper(
v0_3_6_alpha_1::Version::new()
))),
Just(Version::V0_3_6_alpha_2(Wrapper(
v0_3_6_alpha_2::Version::new()
))),
em_version().prop_map(Version::Other),
]
}