File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,16 @@ if (!process.env.DEBUG_STATUS_REPORTED) {
4141/** @type {import('next').NextConfig } */
4242const nextConfig = {
4343 reactStrictMode : true ,
44+ env : {
45+ NEXT_PUBLIC_STATBUS_VERSION : process . env . VERSION || 'dev' ,
46+ NEXT_PUBLIC_STATBUS_VERSION_SHA : ( ( ) => {
47+ try {
48+ return require ( 'child_process' ) . execSync ( 'git rev-parse HEAD' ) . toString ( ) . trim ( ) ;
49+ } catch {
50+ return '' ;
51+ }
52+ } ) ( ) ,
53+ } ,
4454 // output: 'standalone' is primarily for production builds.
4555 // Set it conditionally to avoid potential interference with dev server features like proxying.
4656 ...( isDevelopment && {
Original file line number Diff line number Diff line change @@ -49,6 +49,15 @@ export default function Footer() {
4949 < Link href = "https://www.statbus.org" aria-label = "Statbus homepage" >
5050 < Globe size = { 22 } className = "stroke-ssb-neon" />
5151 </ Link >
52+ < span className = "text-xs text-gray-300" >
53+ Statbus version{ " " }
54+ < Link
55+ href = { `https://github.com/statisticsnorway/statbus/commit/${ process . env . NEXT_PUBLIC_STATBUS_VERSION_SHA } ` }
56+ className = "hover:text-ssb-neon underline"
57+ >
58+ { process . env . NEXT_PUBLIC_STATBUS_VERSION }
59+ </ Link >
60+ </ span >
5261 </ div >
5362 { /* Only render CommandPaletteTriggerButton if mounted, not loading, and authenticated */ }
5463 { showAuthenticatedLayout && (
You can’t perform that action at this time.
0 commit comments