All checks were successful
Deploy to VPS / deploy (push) Successful in 38s
- Added version.json to track base version and build number - Updated Gitea Actions workflow to bump build number on each deploy - Footer now shows version number alongside commit hash - Version passed as build arg through Docker build pipeline Co-Authored-By: Paperclip <noreply@paperclip.ing>
22 lines
513 B
TypeScript
22 lines
513 B
TypeScript
import type { NextConfig } from "next";
|
|
import { execSync } from "child_process";
|
|
|
|
const commitHash = (() => {
|
|
try {
|
|
return execSync("git rev-parse --short HEAD").toString().trim();
|
|
} catch {
|
|
return "dev";
|
|
}
|
|
})();
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: "standalone",
|
|
serverExternalPackages: ["pdfjs-dist", "drizzle-orm", "pg"],
|
|
env: {
|
|
NEXT_PUBLIC_BUILD_HASH: commitHash,
|
|
NEXT_PUBLIC_APP_VERSION: process.env.NEXT_PUBLIC_APP_VERSION || "0.9.0.1",
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|