Files
archicratie-edition/src/lib/buildInfo.ts
archicratia 60d88939b0
All checks were successful
CI / build-and-anchors (push) Successful in 1m25s
SMOKE / smoke (push) Successful in 11s
CI / build-and-anchors (pull_request) Successful in 1m20s
Seed from NAS prod snapshot 20260130-190531
2026-01-31 10:51:38 +00:00

17 lines
452 B
TypeScript

import { readFileSync } from "node:fs";
type Pkg = { version?: string };
function readPkgVersion(): string {
try {
const raw = readFileSync(new URL("../../package.json", import.meta.url), "utf-8");
const pkg = JSON.parse(raw) as Pkg;
return pkg.version ?? "0.0.0";
} catch {
return "0.0.0";
}
}
export const SITE_RELEASE = process.env.PUBLIC_RELEASE || readPkgVersion();
export const BUILD_TIME_ISO = new Date().toISOString();