Skip to content
This repository was archived by the owner on Sep 5, 2025. It is now read-only.

Commit 8d631da

Browse files
authored
Merge pull request #117 from sebsebmc/main
Show branch and git hash
2 parents 2cbede3 + c953ff6 commit 8d631da

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

applications/web/src/components/MainDisplay.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
<Canvas>
6767
<Scene bind:setCameraFocus />
6868
</Canvas>
69+
<div class="dark:text-gray-300 absolute bottom-1 right-1">{GIT_BRANCH} {GIT_HASH}</div>
6970
</div>
7071

7172
<svelte:window on:mousemove={onMouseMove} on:mouseup={onMouseUp} bind:innerWidth bind:innerHeight />

applications/web/vite.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@ import {svelte} from "@sveltejs/vite-plugin-svelte"
33
import wasm from "vite-plugin-wasm"
44
import topLevelAwait from "vite-plugin-top-level-await"
55
import {base} from "./src/base"
6+
import child_process from "node:child_process"
67

78
export default defineConfig({
89
base,
910
plugins: [svelte(), wasm(), topLevelAwait()],
11+
define: {
12+
GIT_HASH: JSON.stringify(child_process.execSync('git rev-parse --short=10 HEAD').toString().trim()),
13+
GIT_BRANCH: JSON.stringify(child_process.execSync('git rev-parse --abbrev-ref HEAD').toString().trim()),
14+
},
1015
build: {
1116
outDir: "dist",
1217
target: "esnext",

0 commit comments

Comments
 (0)