feat: ui commit hash versioning

This commit is contained in:
2026-05-16 11:53:50 +07:00
parent ff6afe5391
commit 80744f40ba
3 changed files with 32 additions and 1 deletions
+7
View File
@@ -0,0 +1,7 @@
import { NextResponse } from "next/server";
import { execSync } from "child_process";
export function GET() {
const hash = execSync("git rev-parse --short HEAD").toString().trim();
return NextResponse.json({ hash });
}
+5 -1
View File
@@ -1,6 +1,7 @@
import type { Metadata } from "next";
import type { ReactNode } from "react";
import "./globals.css";
import { Footer } from "../components/footer";
export const metadata: Metadata = {
title: "pien.studio",
@@ -10,7 +11,10 @@ export const metadata: Metadata = {
export default function RootLayout({ children }: { children: ReactNode }) {
return (
<html lang="en">
<body>{children}</body>
<body>
{children}
<Footer />
</body>
</html>
);
}