feat(client): show git-describe version next to the brand logo

Display the app version (output of `git describe --tags`) in the header
beside the gitmost logo: a clean tag renders as `vX.Y.Z`, otherwise the
tag plus commits-since and short hash (e.g. v0.90.1-56-g25975acd).

- vite.config.ts: resolve APP_VERSION from env (Docker/CI) -> git describe
  (local) -> package.json version fallback
- app-header.tsx: render APP_VERSION after the brand block (ml="md"),
  nudge the Home nav group (ml={50} -> "xl")
- Dockerfile: accept APP_VERSION build-arg in the builder stage (.git is
  excluded from the build context)
- CI: pass APP_VERSION build-arg — release.yml uses the tag, develop.yml
  computes git describe with fetch-depth: 0
- nx.json: add APP_VERSION to the build target inputs so the cache
  invalidates when the version changes
This commit is contained in:
vvzvlad
2026-06-18 04:51:21 +03:00
parent ea56985efd
commit a0a8d3c97f
6 changed files with 58 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
import {
Box,
Group,
Text,
Tooltip,
} from "@mantine/core";
import classes from "./app-header.module.css";
@@ -76,7 +77,20 @@ export function AppHeader() {
</Box>
</Link>
<Group ml={50} gap={5} className={classes.links} visibleFrom="sm">
<Tooltip label={t("Version")}>
<Text
size="xs"
c="dimmed"
lh={1}
ml="md"
visibleFrom="sm"
style={{ userSelect: "text", whiteSpace: "nowrap" }}
>
{APP_VERSION}
</Text>
</Tooltip>
<Group ml="xl" gap={5} className={classes.links} visibleFrom="sm">
{items}
</Group>
</Group>