From f63ca708fe4accab64928237e9a89e7519cc3749 Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 25 Aug 2026 22:20:41 +0200 Subject: [PATCH] Fix deploymentId in next.config.ts --- next.config.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/next.config.ts b/next.config.ts index 7541a289..88d91026 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,7 +1,17 @@ +import { execSync } from "node:child_process"; import type { NextConfig } from "next"; +const getGitCommit = () => { + try { + return execSync("git rev-parse HEAD", { encoding: "utf8" }).trim(); + } catch { + return undefined; + } +}; + const nextConfig: NextConfig = { - serverExternalPackages: ["lzma-js"], + deploymentId: process.env.NEXT_DEPLOYMENT_ID?.trim() || getGitCommit(), + serverExternalPackages: ["lzma"], }; export default nextConfig;