Use the git commit hash as the app version
- Spec header, status pill and footer now document '<env> @ <hash>' instead of invented release numbers - Backend settings expose GIT_COMMIT_HASH / APP_ENV / APP_VERSION, mirroring the original app - Frontend bakes the short hash in at build time and shows it in the top bar
This commit is contained in:
@@ -2,6 +2,7 @@ import { LogOut } from "lucide-react";
|
||||
import { Link, NavLink, Outlet } from "react-router-dom";
|
||||
|
||||
import { cn } from "@/lib/cn";
|
||||
import { APP_VERSION } from "@/lib/version";
|
||||
import { useAuth } from "@/store/auth";
|
||||
|
||||
const navItems = [
|
||||
@@ -21,9 +22,6 @@ export function AppShell() {
|
||||
<span className="rounded bg-ctp-mauve px-2 py-1 font-mono text-xs font-bold tracking-wide text-ctp-crust">
|
||||
J621
|
||||
</span>
|
||||
<span className="hidden text-[11px] font-medium uppercase tracking-[0.14em] text-ctp-overlay0 md:block">
|
||||
Mocha Archive Terminal
|
||||
</span>
|
||||
</Link>
|
||||
|
||||
<nav className="flex items-center gap-1">
|
||||
@@ -47,6 +45,12 @@ export function AppShell() {
|
||||
</nav>
|
||||
|
||||
<div className="ml-auto flex items-center gap-3">
|
||||
<span
|
||||
className="hidden font-mono text-[11px] text-ctp-overlay0 lg:block"
|
||||
title="Running build"
|
||||
>
|
||||
{APP_VERSION}
|
||||
</span>
|
||||
{user ? (
|
||||
<>
|
||||
<div className="flex items-center gap-2">
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
declare const __GIT_COMMIT_HASH__: string;
|
||||
|
||||
export const GIT_COMMIT_HASH = __GIT_COMMIT_HASH__;
|
||||
export const APP_ENV = import.meta.env.DEV ? "dev" : "prod";
|
||||
export const APP_VERSION = `${APP_ENV} @ ${GIT_COMMIT_HASH}`;
|
||||
Reference in New Issue
Block a user