Use GIT_COMMIT_SHA env var instead of execSync for Docker compatibility

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-03 12:56:11 -05:00
co-authored by Claude Opus 4.6
parent ecc6a942a9
commit 1a5a1e631c
5 changed files with 7 additions and 14 deletions
-11
View File
@@ -1,16 +1,5 @@
import { execSync } from "node:child_process";
import type { NextConfig } from "next";
process.env.GIT_COMMIT_SHA = (() => {
try {
return execSync("git rev-parse --short HEAD", {
encoding: "utf-8",
}).trim();
} catch {
return "unknown";
}
})();
const imageBaseUrl = process.env.TMDB_IMAGE_BASE_URL || "";
const imageHost = imageBaseUrl
? new URL(imageBaseUrl).hostname