feat(installer): read bundles from the branch they are published to
All checks were successful
PR Checks / rust-gates (pull_request) Successful in 1m58s
All checks were successful
PR Checks / rust-gates (pull_request) Successful in 1m58s
`main` is protected, so the compose job cannot push a bundle there -- the pre-receive hook declines it, which is not something a nightly cron can resolve. Bundles now publish to a branch of their own, at its root, so BUNDLE_BASE follows them. Everything the original choice was for survives the move: a reviewable diff, a git history of the compat matrix, and a plain anonymous URL that needs no credentials on the shard host. The test's bundle is now a frozen fixture rather than an include of the published file, which this checkout no longer carries. Frozen is the honest shape anyway: a test that silently re-targeted whatever CI published last would change meaning without a commit. It is still a real CI-emitted document, copied verbatim. Nothing is released from `edge`, so no shipped binary ever read the old URL. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -19,8 +19,13 @@ use std::collections::BTreeMap;
|
||||
|
||||
/// Bundles are plain files in this repo, served by Gitea's raw endpoint over anonymous HTTPS —
|
||||
/// the shard host has no Gitea account and needs no git client (PLAN.md §1, §7.1).
|
||||
///
|
||||
/// They live on a **branch of their own**, not on `main`, and at its root. `main` is protected, so
|
||||
/// the unattended compose job cannot push there — a pre-receive hook declines it, which is not
|
||||
/// something a nightly cron can resolve. Everything the original choice was for survives the move:
|
||||
/// a reviewable diff, a git history of the compat matrix, and a plain anonymous URL.
|
||||
const BUNDLE_BASE: &str =
|
||||
"https://gitea.whitlocktech.com/RunicGateway/installer/raw/branch/main/bundles";
|
||||
"https://gitea.whitlocktech.com/RunicGateway/installer/raw/branch/bundles";
|
||||
|
||||
/// The only `schema` this build understands.
|
||||
const SUPPORTED_SCHEMA: u32 = 1;
|
||||
@@ -177,9 +182,13 @@ pub fn parse(body: &str) -> Result<Bundle> {
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
/// The first published bundle, verbatim from `bundles/current.json`. Using the real document
|
||||
/// rather than a hand-written stand-in is the point: it is what CI actually emits.
|
||||
const CURRENT: &str = include_str!("../bundles/current.json");
|
||||
/// The first published bundle, verbatim. Using a real document rather than a hand-written
|
||||
/// stand-in is the point: it is what CI actually emits.
|
||||
///
|
||||
/// It is a frozen copy rather than a live include, because published bundles moved off `main`
|
||||
/// onto a branch this checkout does not carry. Frozen is the honest shape anyway — a test that
|
||||
/// silently re-targeted whatever CI published last would change meaning without a commit.
|
||||
const CURRENT: &str = include_str!("../tests/fixtures/published-bundle.json");
|
||||
|
||||
#[test]
|
||||
fn the_published_bundle_parses() {
|
||||
|
||||
Reference in New Issue
Block a user