diff --git a/next.config.ts b/next.config.ts index 1ffe82a..954b109 100644 --- a/next.config.ts +++ b/next.config.ts @@ -13,8 +13,13 @@ const gitCommitHash = generateGitCommitHash(); const nextConfig: NextConfig = { output: "standalone", generateBuildId: () => gitCommitHash, - env: { - BUILD_ID_ENV: gitCommitHash + webpack: (config, { webpack, buildId, isServer }) => { + config.plugins.push( + new webpack.DefinePlugin({ + 'process.env.BUILD_ID_ENV': JSON.stringify(buildId) + }) + ); + return config; } }; diff --git a/src/Dockerfile b/src/Dockerfile index f4f5f00..f57a7da 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -38,6 +38,8 @@ ENV NEXT_TELEMETRY_DISABLED=1 ARG GIT_COMMIT ENV GIT_COMMIT=$GIT_COMMIT +RUN echo ${GIT_COMMIT} + RUN \ if [ -f yarn.lock ]; then yarn run build; \ elif [ -f package-lock.json ]; then npm run build; \ diff --git a/src/app/settings/page.tsx b/src/app/settings/page.tsx index d8e9614..f2c817d 100644 --- a/src/app/settings/page.tsx +++ b/src/app/settings/page.tsx @@ -10,6 +10,7 @@ import AscendingCard from "@/components/ascending-card"; import Link from "next/link"; import WideContainer from "@/components/wide-container"; + export default function Settings(): ReactNode { const isMobile = useIsMobile(); @@ -28,9 +29,9 @@ export default function Settings(): ReactNode { -
Build ID: {process.env.BUILD_ID_ENV}
-Build ID: {process.env.BUILD_ID_ENV}
+