fix(stage-ui): updated format of version info

This commit is contained in:
Neko Ayaka
2026-04-01 00:17:32 +08:00
parent 106a721f45
commit 2d2ee38f37
2 changed files with 7 additions and 2 deletions
+1
View File
@@ -1,6 +1,7 @@
{
"name": "@proj-airi/stage-ui",
"type": "module",
"version": "0.9.0-beta.2",
"private": true,
"description": "Shared core for stage",
"author": {
@@ -1,11 +1,15 @@
import buildTime from '~build/time'
import { isStageWeb } from '@proj-airi/stage-shared'
import { abbreviatedSha, branch } from '~build/git'
import { version } from '~build/package'
import packageJSON from '../../package.json'
export function useBuildInfo() {
const version = packageJSON.version ?? 'dev'
return {
version: version ?? 'dev',
version: isStageWeb() ? `${version} (${abbreviatedSha})` : version,
commit: abbreviatedSha,
branch,
builtOn: buildTime.toISOString(),