chore: track site sources + ignore local env/backups

This commit is contained in:
2026-01-19 11:46:39 +01:00
parent aece8c5526
commit 5eb23a3de4
50 changed files with 3158 additions and 38 deletions

16
src/lib/buildInfo.ts Normal file
View File

@@ -0,0 +1,16 @@
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();