From 6118ba505b986383cc0060241a57765db89c4a69 Mon Sep 17 00:00:00 2001 From: Marco Pedone Date: Tue, 25 Nov 2025 12:07:11 +0100 Subject: [PATCH] refactor: remove custom build ID generation fallback and use timestamp-based ID --- apps/infoalloggi/next.config.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/apps/infoalloggi/next.config.ts b/apps/infoalloggi/next.config.ts index b3e3d94..9a46301 100644 --- a/apps/infoalloggi/next.config.ts +++ b/apps/infoalloggi/next.config.ts @@ -11,24 +11,13 @@ const withBundleAnalyzer = require("@next/bundle-analyzer")({ enabled: process.env.ANALYZE === "true", }); -function getBuildId(): string { - try { - const { execSync } = require("node:child_process"); - // Get short hash (8 characters) instead of full hash - return execSync("git rev-parse --short=8 HEAD").toString().trim(); - } catch { - // Fallback to timestamp-based ID - return `${Date.now().toString(36)}`; - } -} - async function createNextConfig(): Promise { const { createJiti } = await import("jiti"); const jiti = createJiti(fileURLToPath(import.meta.url)); await jiti.import("./src/env.ts"); - const buildId = getBuildId(); + const buildId = `${Date.now().toString(36)}`; const apiVersion = `v.${buildId}`; return withBundleAnalyzer({