Skip to content

Commit b461177

Browse files
authored
version updates
Version updates
2 parents 100a689 + 05332a0 commit b461177

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

src/types/globals.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declare const __APP_VERSION__: string;
2+
declare const __GIT_HASH__: string;

src/ui/components/Footer.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,10 @@ export function Footer() {
158158
<span className="text-sm">Copyright © 2025 Soldered. All rights reserved.</span>
159159
</div>
160160

161-
{/* Version bottom-right */}
162-
<span className="absolute bottom-2 right-4 text-s text-gray-500">v1.0.0</span>
161+
{/* Version bottom-right (dynamic) */}
162+
<span className="absolute bottom-2 right-4 text-s text-gray-500">
163+
{"v" + __APP_VERSION__}{__GIT_HASH__ ? ` (${__GIT_HASH__})` : ""}
164+
</span>
163165
</footer>
164166
);
165167
}

vite.config.mts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
import { defineConfig, loadEnv } from "vite";
2+
import { version } from "./package.json";
23
import react from "@vitejs/plugin-react";
34

45
export default defineConfig(({ mode }) => {
56
const env = loadEnv(mode, process.cwd(), "");
7+
68
return {
79
base: env.VITE_BASE ?? "/",
810
plugins: [react()],
11+
define: {
12+
__APP_VERSION__: JSON.stringify(version),
13+
__GIT_HASH__: JSON.stringify(process.env.VITE_GIT_HASH || ""),
14+
},
915
};
1016
});

0 commit comments

Comments
 (0)