mirror of
https://github.com/ClipFusion-org/clipfusion.git
synced 2025-08-03 19:15:08 +00:00
trying to get git commit hash to work
This commit is contained in:
parent
2ddd8b9d3b
commit
70aa3992f8
@ -2,6 +2,13 @@ import type { NextConfig } from "next";
|
|||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
output: "standalone",
|
output: "standalone",
|
||||||
|
generateBuildId: () => {
|
||||||
|
if (process.env.NODE_ENV === "development") return "development server";
|
||||||
|
if (!process.env.GIT_COMMIT) return "git commit hash is unavailable";
|
||||||
|
const hash = process.env.GIT_COMMIT;
|
||||||
|
if (!hash || hash.trim().length == 0) return "empty git commit hash";
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default nextConfig;
|
export default nextConfig;
|
||||||
|
@ -35,6 +35,9 @@ COPY . .
|
|||||||
|
|
||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
|
|
||||||
|
ARG GIT_COMMIT
|
||||||
|
ENV GIT_COMMIT=$GIT_COMMIT
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
if [ -f yarn.lock ]; then yarn run build; \
|
if [ -f yarn.lock ]; then yarn run build; \
|
||||||
elif [ -f package-lock.json ]; then npm run build; \
|
elif [ -f package-lock.json ]; then npm run build; \
|
||||||
|
Loading…
Reference in New Issue
Block a user