import Link from "next/link" import { PageHeader } from "@/components/page-header" import { OpsPanel } from "@/components/ops-panel" import { buttonVariants } from "@/components/ui/button" import { formatAppVersionLabel, getAppVersion, getReleaseUrl } from "@/lib/app-version" import { formatCommitSubject, getReleaseCommitPreview, } from "@/lib/release-commits" import { readReleaseManifest } from "@/lib/release-manifest" import { cn } from "@/lib/utils" import { ExternalLinkIcon } from "lucide-react" export const dynamic = "force-dynamic" function formatPublishedAt(value: string | null, isProdBuild: boolean): string { if (value) { return "Дата манифеста: " + new Intl.DateTimeFormat("ru-RU", { dateStyle: "long", timeStyle: "short", }).format(new Date(value)) } return isProdBuild ? "Дата манифеста не указана" : "Локальная сборка" } export default function ReleasesPage() { const manifest = readReleaseManifest() const version = getAppVersion() const isProdBuild = !version.endsWith("-dev") const releaseUrl = getReleaseUrl() || manifest?.releaseUrl || null const commits = getReleaseCommitPreview(manifest?.commits ?? []) return (
Версия формируется автоматически от базы v1.0.0 по Conventional Commits.
Метаданные релиза недоступны или повреждены. Дата, ссылка и список коммитов не подтверждены.
: manifest.version !== version && isProdBuild ?Манифест относится к {formatAppVersionLabel(manifest.version)}; версия запущенной сборки отличается.
: null}{manifest ? "Коммитов для отображения пока нет." : "Нет подтверждённых метаданных."}
) : ({formatCommitSubject(commit.subject)}