mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-19 19:25:56 +00:00
Channel source selection lives in coa-core; e2e checks for the published channel and SQUID servers
preview_channel_e2e installs from the stable channel, takes the preview from the published preview channel the way the Manager does, and checks the server is current afterwards. preview_migration_e2e gains a squid mode that keeps SQUID's SQL journals and expects SQUID's Playerbots instead of Companions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4facefc5dc
commit
048d746d29
4 files changed
+171
-29
No files matched your search
@@ -78,6 +78,29 @@ pub fn resolve(channel: &str) -> Result<Source> {
|
||||
)))
|
||||
}
|
||||
|
||||
/// The stable release used when the stable pointer has not been published yet.
|
||||
pub const STABLE_FALLBACK_URL: &str =
|
||||
"https://github.com/Corfirean/coa-server-build/releases/download/stable";
|
||||
|
||||
/// Stable updates and installation images: the signed stable pointer, else the fixed stable release.
|
||||
pub fn stable_source() -> Result<Source> {
|
||||
match resolve("stable") {
|
||||
Ok(source) => Ok(source),
|
||||
Err(Error::PackageNotPublished(_)) => Ok(Source::Url(STABLE_FALLBACK_URL.into())),
|
||||
Err(error) => Err(error),
|
||||
}
|
||||
}
|
||||
|
||||
/// Where the Modules Preview Manager looks for server updates when none is chosen: its own signed channel,
|
||||
/// or the stable channel until a preview exists (a stable server is where every preview server starts).
|
||||
pub fn preview_update_source() -> Result<Source> {
|
||||
match resolve("preview") {
|
||||
Ok(source) => Ok(source),
|
||||
Err(Error::PackageNotPublished(_)) => stable_source(),
|
||||
Err(error) => Err(error),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn sign(pointer: &Pointer, seed: &str) -> Result<Vec<u8>> {
|
||||
use base64::{engine::general_purpose::STANDARD, Engine};
|
||||
use ed25519_dalek::{Signer, SigningKey};
|
||||
|
||||
Reference in new issue
Block a user