Add publisher release versions to plugins

This commit is contained in:
2026-09-18 01:16:45 -04:00
parent 166f039ae6
commit a718efc9e7
15 changed files with 167 additions and 29 deletions
+5 -4
View File
@@ -2,6 +2,7 @@
import BetaPlanBuilder from "$ui/components/BetaPlanBuilder.svelte";
import { defaultPlan, parseBetaPlan } from "$lib/beta-plan.js";
import { onMount, onDestroy } from 'svelte';
import { artifactVersionLabel } from '$lib/artifact-version.js';
import { goto } from '$app/navigation';
import Card from '$ui/components/primitives/Card.svelte';
import Badge from '$ui/components/primitives/Badge.svelte';
@@ -21,7 +22,7 @@
closed_at: string | null;
scripts: Array<{
id: number; name: string; target_rel_path: string; kind: ArtifactKind;
version: { id: number; version: number; sha256: string } | null;
version: { id: number; version: number; release_version: string | null; sha256: string } | null;
}>;
servers: Array<{ server: string; stage: string; error: string | null }>;
}
@@ -35,7 +36,7 @@
} | null;
runningBetaId: number | null;
}
interface Version { id: number; version: number; sha256: string; size: number; state: 'untested' | 'tested' | 'test-failed'; }
interface Version { id: number; version: number; release_version: string | null; sha256: string; size: number; state: 'untested' | 'tested' | 'test-failed'; }
interface ServerRow { name: string; game: string | null; map: string | null; }
interface ScriptDetail { script: ScriptListRow; versions: Version[]; matchedServers: string[]; }
interface Pick { key: number; scriptId: number | null; versionId: number | null; }
@@ -205,7 +206,7 @@
if (b.scripts.length === 0) return '(no artifacts)';
if (b.scripts.length === 1) {
const s = b.scripts[0];
return `[${s.kind}] ${s.name} · v${s.version?.version ?? '?'}`;
return `[${s.kind}] ${s.name} · ${artifactVersionLabel(s.version)}`;
}
const byKind: Record<string, number> = {};
for (const s of b.scripts) byKind[s.kind] = (byKind[s.kind] ?? 0) + 1;
@@ -265,7 +266,7 @@
<option value={null}>—</option>
{:else}
{#each versionsForRow(row) as v (v.id)}
<option value={v.id}>v{v.version} · {v.sha256.slice(0, 8)} · {v.state}</option>
<option value={v.id}>{artifactVersionLabel(v)} · {v.sha256.slice(0, 8)} · {v.state}</option>
{/each}
{/if}
</select>