From 0e466435d25b5f5f22651ec66ea57bc8757e01fa Mon Sep 17 00:00:00 2001 From: flym Date: Tue, 8 Sep 2026 20:52:52 +0800 Subject: [PATCH] fix: add deployment build stamp --- components/build-stamp.tsx | 5 +++++ components/site-footer.tsx | 3 ++- lib/build-info.ts | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 components/build-stamp.tsx create mode 100644 lib/build-info.ts diff --git a/components/build-stamp.tsx b/components/build-stamp.tsx new file mode 100644 index 0000000..5dcf2a8 --- /dev/null +++ b/components/build-stamp.tsx @@ -0,0 +1,5 @@ +import { buildCommit } from "@/lib/build-info"; + +export function BuildStamp() { + return build {buildCommit.slice(0, 7)}; +} diff --git a/components/site-footer.tsx b/components/site-footer.tsx index 267d016..c579171 100644 --- a/components/site-footer.tsx +++ b/components/site-footer.tsx @@ -1,5 +1,6 @@ import Link from "next/link"; import { BrandMark } from "@/components/brand-mark"; +import { BuildStamp } from "@/components/build-stamp"; export function SiteFooter() { return ( @@ -25,7 +26,7 @@ export function SiteFooter() {
© 2026 Shenzhen Kaotings Technology Co., Ltd. - Phase 1 development preview + · Phase 1 development preview
); diff --git a/lib/build-info.ts b/lib/build-info.ts new file mode 100644 index 0000000..f7fa209 --- /dev/null +++ b/lib/build-info.ts @@ -0,0 +1 @@ +export const buildCommit = process.env.NEXT_PUBLIC_BUILD_COMMIT ?? "local";