Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions scripts/catalog-components.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,3 +289,21 @@ test("DriverVersionsCatalog showRebootStep prop controls reboot banner", () => {
});
assert.ok(!withoutReboot.includes("Final Step: Reboot"));
});

test("DriverVersionsCatalog generates rebase commands using the correct package for bluefin-lts", () => {
const html = render(DriverVersionsCatalog, {
streamId: "bluefin-lts",
catalogOverride: ltsCatalog,
});

assert.ok(
html.includes(
"sudo bootc switch --enforce-container-sigpolicy ghcr.io/projectbluefin/bluefin-lts:lts-20260906",
),
);
assert.ok(
!html.includes(
"sudo bootc switch --enforce-container-sigpolicy ghcr.io/projectbluefin/bluefin:lts-20260906",
),
);
});
10 changes: 9 additions & 1 deletion src/components/DriverVersionsCatalog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,17 @@ function UserspaceMarker({
);
}

const STREAM_PACKAGES: Record<string, string> = {
"bluefin-stable": "bluefin",
"bluefin-lts": "bluefin-lts",
"dakota-latest": "dakota",
"utah-testing": "utah",
};

function buildRebaseCommand(stream: DriverStream, tag: string): string {
const safeTag = tag.replace(/[^a-zA-Z0-9_.-]/g, "");
return `sudo bootc switch --enforce-container-sigpolicy ghcr.io/projectbluefin/${stream.id.replace(/-.*/, "")}:${safeTag}`;
const pkg = STREAM_PACKAGES[stream.id] ?? stream.id.replace(/-.*/, "");
return `sudo bootc switch --enforce-container-sigpolicy ghcr.io/projectbluefin/${pkg}:${safeTag}`;
}

function ReleaseNode({
Expand Down