From 063305c55271e0b40527eabcb75d665e2bac72a5 Mon Sep 17 00:00:00 2001 From: JakeBreath Date: Thu, 17 Sep 2026 08:33:22 -0500 Subject: [PATCH] Remove frontend build-version plumbing The backend status endpoint already reports the shared git hash and environment, so the SPA no longer needs its own baked copy. --- frontend/src/lib/version.ts | 5 ----- frontend/vite.config.ts | 17 ----------------- 2 files changed, 22 deletions(-) delete mode 100644 frontend/src/lib/version.ts diff --git a/frontend/src/lib/version.ts b/frontend/src/lib/version.ts deleted file mode 100644 index 34e7467..0000000 --- a/frontend/src/lib/version.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare const __GIT_COMMIT_HASH__: string; - -export const GIT_COMMIT_HASH = __GIT_COMMIT_HASH__; -export const APP_ENV = import.meta.env.DEV ? "dev" : "prod"; -export const APP_VERSION = `${APP_ENV} @ ${GIT_COMMIT_HASH}`; diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 63ba397..5ac699a 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -1,30 +1,13 @@ -import { execSync } from "node:child_process"; import { fileURLToPath, URL } from "node:url"; import tailwindcss from "@tailwindcss/vite"; import react from "@vitejs/plugin-react"; import { defineConfig } from "vite"; -function gitCommitHash(): string { - try { - return execSync("git rev-parse --short HEAD", { - cwd: fileURLToPath(new URL(".", import.meta.url)), - stdio: ["ignore", "pipe", "ignore"], - }) - .toString() - .trim(); - } catch { - return "unknown"; - } -} - const backend = process.env.VITE_BACKEND ?? "http://127.0.0.1:8000"; // https://vite.dev/config/ export default defineConfig({ - define: { - __GIT_COMMIT_HASH__: JSON.stringify(gitCommitHash()), - }, plugins: [react(), tailwindcss()], resolve: { alias: {