Files
electric-cherry/src/lib/artifact-version.ts
T
2026-10-12 18:46:57 -04:00

13 lines
494 B
TypeScript

/** Keep the upload number visible: two builds may share a publisher's release tag. */
export function artifactVersionLabel(
version: { version: number; release_version?: string | null } | null | undefined,
kind?: string
): string {
if (!version) return '—';
return version.release_version
? `${version.release_version} (upload ${version.version})`
: kind === 'script'
? `Unversioned (upload ${version.version})`
: `v${version.version}`;
}