fix(stage-ui): updated format of version info
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user