From dfb385aac96a20fd36bd7f939e96c0b3aca2c022 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 27 Jun 2022 15:12:44 -0300 Subject: anastasis build instruction and some fixes --- packages/anastasis-webui/src/components/menu/SideBar.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'packages/anastasis-webui/src/components/menu/SideBar.tsx') diff --git a/packages/anastasis-webui/src/components/menu/SideBar.tsx b/packages/anastasis-webui/src/components/menu/SideBar.tsx index 45d447d3c..7cc65a62d 100644 --- a/packages/anastasis-webui/src/components/menu/SideBar.tsx +++ b/packages/anastasis-webui/src/components/menu/SideBar.tsx @@ -28,6 +28,10 @@ interface Props { mobile?: boolean; } +const VERSION: string = process.env.__VERSION__ || "dev"; +const GIT_HASH: string | undefined = process.env.__GIT_HASH__; +const VERSION_WITH_HASH = GIT_HASH ? `${VERSION}-${GIT_HASH}` : VERSION; + export function Sidebar({ mobile }: Props): VNode { // const config = useConfigContext(); const config = { version: "none" }; @@ -57,7 +61,7 @@ export function Sidebar({ mobile }: Props): VNode { class="is-size-7 has-text-right" style={{ lineHeight: 0, marginTop: -10 }} > - Version {process.env.__VERSION__} ({config.version}) + Version {VERSION_WITH_HASH} -- cgit v1.2.3