mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
fix version bump
This commit is contained in:
@@ -4,13 +4,13 @@ use exver::{PreReleaseSegment, VersionRange};
|
||||
use imbl_value::json;
|
||||
|
||||
use super::v0_3_5::V0_3_0_COMPAT;
|
||||
use super::{v0_3_6_alpha_11, VersionT};
|
||||
use super::{v0_3_6_alpha_12, VersionT};
|
||||
use crate::prelude::*;
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
static ref V0_3_6_alpha_12: exver::Version = exver::Version::new(
|
||||
static ref V0_3_6_alpha_13: exver::Version = exver::Version::new(
|
||||
[0, 3, 6],
|
||||
[PreReleaseSegment::String("alpha".into()), 12.into()]
|
||||
[PreReleaseSegment::String("alpha".into()), 13.into()]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -18,48 +18,19 @@ lazy_static::lazy_static! {
|
||||
pub struct Version;
|
||||
|
||||
impl VersionT for Version {
|
||||
type Previous = v0_3_6_alpha_11::Version;
|
||||
type Previous = v0_3_6_alpha_12::Version;
|
||||
type PreUpRes = ();
|
||||
|
||||
async fn pre_up(self) -> Result<Self::PreUpRes, Error> {
|
||||
Ok(())
|
||||
}
|
||||
fn semver(self) -> exver::Version {
|
||||
V0_3_6_alpha_12.clone()
|
||||
V0_3_6_alpha_13.clone()
|
||||
}
|
||||
fn compat(self) -> &'static VersionRange {
|
||||
&V0_3_0_COMPAT
|
||||
}
|
||||
fn up(self, db: &mut Value, _: Self::PreUpRes) -> Result<(), Error> {
|
||||
let bindings: BTreeMap<u16, Value> = [(
|
||||
80,
|
||||
json!({
|
||||
"enabled": false,
|
||||
"options": {
|
||||
"preferredExternalPort": 80,
|
||||
"addSsl": {
|
||||
"preferredExternalPort": 443,
|
||||
"alpn": { "specified": [ "http/1.1", "h2" ] },
|
||||
},
|
||||
"secure": null,
|
||||
},
|
||||
"net": {
|
||||
"assignedPort": null,
|
||||
"assignedSslPort": 443,
|
||||
"public": false,
|
||||
}
|
||||
}),
|
||||
)]
|
||||
.into_iter()
|
||||
.collect();
|
||||
let onion = db["public"]["serverInfo"]["onionAddress"].clone();
|
||||
db["public"]["serverInfo"]["host"] = json!({
|
||||
"bindings": bindings,
|
||||
"onions": [onion],
|
||||
"domains": {},
|
||||
"hostnameInfo": {},
|
||||
});
|
||||
|
||||
Ok(())
|
||||
}
|
||||
fn down(self, _db: &mut Value) -> Result<(), Error> {
|
||||
|
||||
Reference in New Issue
Block a user