From 80744f40ba7df5f83568d0c51425475f989232ef Mon Sep 17 00:00:00 2001 From: Yuzu Date: Sat, 16 May 2026 11:51:11 +0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20ui=20commit=20hash=20versio?= =?UTF-8?q?ning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/app/api/commit-hash/route.ts | 7 +++++++ apps/web/app/layout.tsx | 6 +++++- apps/web/components/footer.tsx | 20 ++++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 apps/web/app/api/commit-hash/route.ts create mode 100644 apps/web/components/footer.tsx diff --git a/apps/web/app/api/commit-hash/route.ts b/apps/web/app/api/commit-hash/route.ts new file mode 100644 index 0000000..8b4dce4 --- /dev/null +++ b/apps/web/app/api/commit-hash/route.ts @@ -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 }); +} \ No newline at end of file diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index 54b43d0..b0182c6 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -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 ( - {children} + + {children} +