From 2e6fc7e4a0c9236267ddc9f62f3a560991fd9296 Mon Sep 17 00:00:00 2001 From: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com> Date: Fri, 12 May 2023 00:35:50 -0600 Subject: [PATCH] v0.3.4.2 (#2269) --- backend/Cargo.lock | 2 +- backend/Cargo.toml | 2 +- backend/src/version/mod.rs | 10 ++++++- backend/src/version/v0_3_4_2.rs | 30 +++++++++++++++++++ frontend/package-lock.json | 4 +-- frontend/package.json | 2 +- frontend/patchdb-ui-seed.json | 2 +- .../ui/src/app/services/api/api.fixures.ts | 5 +++- .../ui/src/app/services/api/mock-patch.ts | 2 +- system-images/compat/Cargo.lock | 2 +- 10 files changed, 51 insertions(+), 10 deletions(-) create mode 100644 backend/src/version/v0_3_4_2.rs diff --git a/backend/Cargo.lock b/backend/Cargo.lock index ebfbb954e..93b8198d0 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -1354,7 +1354,7 @@ dependencies = [ [[package]] name = "embassy-os" -version = "0.3.4-rev.1" +version = "0.3.4-rev.2" dependencies = [ "aes", "async-compression", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 2c5a74daf..a829bd7f9 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -14,7 +14,7 @@ keywords = [ name = "embassy-os" readme = "README.md" repository = "https://github.com/Start9Labs/start-os" -version = "0.3.4-rev.1" +version = "0.3.4-rev.2" [lib] name = "embassy" diff --git a/backend/src/version/mod.rs b/backend/src/version/mod.rs index 5b3b0ab93..0d8af4163 100644 --- a/backend/src/version/mod.rs +++ b/backend/src/version/mod.rs @@ -21,8 +21,9 @@ mod v0_3_2_1; mod v0_3_3; mod v0_3_4; mod v0_3_4_1; +mod v0_3_4_2; -pub type Current = v0_3_4_1::Version; +pub type Current = v0_3_4_2::Version; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone)] #[serde(untagged)] @@ -39,6 +40,7 @@ enum Version { V0_3_3(Wrapper), V0_3_4(Wrapper), V0_3_4_1(Wrapper), + V0_3_4_2(Wrapper), Other(emver::Version), } @@ -66,6 +68,7 @@ impl Version { Version::V0_3_3(Wrapper(x)) => x.semver(), Version::V0_3_4(Wrapper(x)) => x.semver(), Version::V0_3_4_1(Wrapper(x)) => x.semver(), + Version::V0_3_4_2(Wrapper(x)) => x.semver(), Version::Other(x) => x.clone(), } } @@ -251,6 +254,10 @@ pub async fn init( v.0.migrate_to(&Current::new(), db, secrets, receipts) .await? } + Version::V0_3_4_2(v) => { + v.0.migrate_to(&Current::new(), db, secrets, receipts) + .await? + } Version::Other(_) => { return Err(Error::new( eyre!("Cannot downgrade"), @@ -295,6 +302,7 @@ mod tests { Just(Version::V0_3_3(Wrapper(v0_3_3::Version::new()))), Just(Version::V0_3_4(Wrapper(v0_3_4::Version::new()))), Just(Version::V0_3_4_1(Wrapper(v0_3_4_1::Version::new()))), + Just(Version::V0_3_4_2(Wrapper(v0_3_4_2::Version::new()))), em_version().prop_map(Version::Other), ] } diff --git a/backend/src/version/v0_3_4_2.rs b/backend/src/version/v0_3_4_2.rs new file mode 100644 index 000000000..1fa4f7939 --- /dev/null +++ b/backend/src/version/v0_3_4_2.rs @@ -0,0 +1,30 @@ +use async_trait::async_trait; +use emver::VersionRange; + +use super::v0_3_0::V0_3_0_COMPAT; +use super::*; + +const V0_3_4_2: emver::Version = emver::Version::new(0, 3, 4, 2); + +#[derive(Clone, Debug)] +pub struct Version; + +#[async_trait] +impl VersionT for Version { + type Previous = v0_3_4_1::Version; + fn new() -> Self { + Version + } + fn semver(&self) -> emver::Version { + V0_3_4_2 + } + fn compat(&self) -> &'static VersionRange { + &*V0_3_0_COMPAT + } + async fn up(&self, _db: &mut Db, _secrets: &PgPool) -> Result<(), Error> { + Ok(()) + } + async fn down(&self, _db: &mut Db, _secrets: &PgPool) -> Result<(), Error> { + Ok(()) + } +} diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 28abcdad9..0dc9d6f81 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,11 +1,11 @@ { - "name": "start-os", + "name": "startos-ui", "version": "0.3.4.2", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "start-os", + "name": "startos-ui", "version": "0.3.4.2", "dependencies": { "@angular/animations": "^14.1.0", diff --git a/frontend/package.json b/frontend/package.json index 4a5179142..af3da5083 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,5 +1,5 @@ { - "name": "start-os", + "name": "startos-ui", "version": "0.3.4.2", "author": "Start9 Labs, Inc", "homepage": "https://start9.com/", diff --git a/frontend/patchdb-ui-seed.json b/frontend/patchdb-ui-seed.json index c43d0b3b3..96aca4f14 100644 --- a/frontend/patchdb-ui-seed.json +++ b/frontend/patchdb-ui-seed.json @@ -1,6 +1,6 @@ { "name": null, - "ack-welcome": "0.3.4.1", + "ack-welcome": "0.3.4.2", "marketplace": { "selected-url": "https://registry.start9.com/", "known-hosts": { diff --git a/frontend/projects/ui/src/app/services/api/api.fixures.ts b/frontend/projects/ui/src/app/services/api/api.fixures.ts index 1d06dcb31..29f436b9e 100644 --- a/frontend/projects/ui/src/app/services/api/api.fixures.ts +++ b/frontend/projects/ui/src/app/services/api/api.fixures.ts @@ -20,9 +20,12 @@ export module Mock { updated: true, } export const MarketplaceEos: RR.GetMarketplaceEosRes = { - version: '0.3.4', + version: '0.3.4.2', headline: 'Our biggest release ever.', 'release-notes': { + '0.3.4.2': 'Some **Markdown** release _notes_ for 0.3.4.2', + '0.3.4.1': 'Some **Markdown** release _notes_ for 0.3.4.1', + '0.3.4': 'Some **Markdown** release _notes_ for 0.3.4', '0.3.3': 'Some **Markdown** release _notes_ for 0.3.3', '0.3.2.1': 'Some **Markdown** release _notes_ for 0.3.2.1', '0.3.2': 'Some **Markdown** release _notes_ for 0.3.2', diff --git a/frontend/projects/ui/src/app/services/api/mock-patch.ts b/frontend/projects/ui/src/app/services/api/mock-patch.ts index 4f16aee7b..6ee21f137 100644 --- a/frontend/projects/ui/src/app/services/api/mock-patch.ts +++ b/frontend/projects/ui/src/app/services/api/mock-patch.ts @@ -44,7 +44,7 @@ export const mockPatchData: DataModel = { }, 'server-info': { id: 'abcdefgh', - version: '0.3.4', + version: '0.3.4.2', 'last-backup': new Date(new Date().valueOf() - 604800001).toISOString(), 'lan-address': 'https://adjective-noun.local', 'tor-address': 'http://myveryownspecialtoraddress.onion', diff --git a/system-images/compat/Cargo.lock b/system-images/compat/Cargo.lock index 3e47d2028..924abcd5e 100644 --- a/system-images/compat/Cargo.lock +++ b/system-images/compat/Cargo.lock @@ -1171,7 +1171,7 @@ dependencies = [ [[package]] name = "embassy-os" -version = "0.3.4-rev.1" +version = "0.3.4-rev.2" dependencies = [ "aes", "async-compression",