maybe fix?
Some checks failed
Deploy App / docker (ubuntu-latest) (push) Failing after 40s

This commit is contained in:
Lee
2024-04-21 20:18:01 +01:00
parent 23c4284d8a
commit 0b9a112c5b
3 changed files with 25 additions and 1 deletions

View File

@ -1,4 +1,16 @@
import { withSentryConfig } from "@sentry/nextjs";
import nextBuildId from "next-build-id";
import { fileURLToPath } from "url";
import path from "path";
/**
* The current git commit hash.
*
* @type {string|string} The current git commit hash.
*/
const buildId = (
process.env.GIT_REV || nextBuildId.sync({ dir: path.dirname(fileURLToPath(import.meta.url)) })
).substring(0, 7);
/** @type {import('next').NextConfig} */
const nextConfig = {
@ -17,6 +29,9 @@ const nextConfig = {
},
],
},
env: {
NEXT_PUBLIC_BUILD_ID: buildId,
},
experimental: {
mdxRs: true,
},
@ -32,7 +47,7 @@ export default withSentryConfig(
project: "frontend",
url: "https://glitchtip.fascinated.cc/",
authToken: process.env.SENTRY_AUTH_TOKEN || "",
release: `frontend@${process.env.GIT_REV || "dev"}`,
release: `frontend@${buildId}`,
},
{
// For all available options, see: