feat: add prerelease RPM builds from upstream main branch
Some checks failed
deploy-ui / build-and-deploy (push) Has been cancelled

Poll upstream main branch HEAD alongside release tags. When a new commit
is detected, build and publish prerelease RPMs to a separate unstable
repo at rpm.lair.cafe/fedora/$releasever/$basearch/unstable/.

RPM versioning uses the Fedora snapshot convention (e.g.
0.8.1-0.1.20260511git1a2b3c4.fc43) so stable releases automatically
supersede any installed prerelease.

- RPM spec: conditional Release field via mistralrs_prerelease define
- poll-upstream.yml: new check-prerelease job fetches main HEAD + Cargo.toml version
- build-prerelease.yml: new workflow for commit-based builds without --locked
- UI: fetch both stable/unstable manifests, show channel badges, add
  unstable repo setup instructions to home page

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-11 14:21:28 +03:00
parent fff56a626c
commit a79eafd70f
8 changed files with 423 additions and 25 deletions

View File

@@ -1,23 +1,47 @@
import { useEffect, useState } from "react";
import type { PackagesManifest } from "../types/packages.ts";
import type { Channel, PackagesManifest, PackageVersion } from "../types/packages.ts";
const MANIFEST_URL = "/fedora/43/x86_64/packages.json";
const STABLE_URL = "/fedora/43/x86_64/packages.json";
const UNSTABLE_URL = "/fedora/43/x86_64/unstable/packages.json";
function tagPackages(
manifest: PackagesManifest,
channel: Channel,
): PackageVersion[] {
return manifest.packages.map((p) => ({
...p,
channel,
baseUrl: manifest.baseUrl,
}));
}
export function usePackages() {
const [manifest, setManifest] = useState<PackagesManifest | null>(null);
const [packages, setPackages] = useState<PackageVersion[]>([]);
const [loading, setLoading] = useState(true);
const [error, setError] = useState<string | null>(null);
useEffect(() => {
let cancelled = false;
fetch(MANIFEST_URL)
.then((res) => {
if (!res.ok) throw new Error(`HTTP ${res.status}`);
return res.json() as Promise<PackagesManifest>;
})
.then((data) => {
if (!cancelled) setManifest(data);
const fetchManifest = async (
url: string,
channel: Channel,
): Promise<PackageVersion[]> => {
const res = await fetch(url);
if (!res.ok) {
if (res.status === 404) return [];
throw new Error(`HTTP ${res.status} fetching ${channel} manifest`);
}
const data = (await res.json()) as PackagesManifest;
return tagPackages(data, channel);
};
Promise.all([
fetchManifest(STABLE_URL, "stable"),
fetchManifest(UNSTABLE_URL, "unstable"),
])
.then(([stable, unstable]) => {
if (!cancelled) setPackages([...stable, ...unstable]);
})
.catch((err: unknown) => {
if (!cancelled)
@@ -32,5 +56,5 @@ export function usePackages() {
};
}, []);
return { manifest, loading, error };
return { packages, loading, error };
}