File tree Expand file tree Collapse file tree
apps/web/src/features/about/pages Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ const translations = {
1414 en : 'Branch' ,
1515 fr : 'Branche'
1616 } ,
17+ buildDate : {
18+ en : 'Build Date' ,
19+ fr : 'Date de construction'
20+ } ,
1721 buildType : {
1822 en : 'Build Type' ,
1923 fr : 'Type de construction'
@@ -65,6 +69,9 @@ export const AboutPage = () => {
6569
6670 const translateReleaseInfo = ( release : ReleaseInfo ) => {
6771 const translatedReleaseInfo = {
72+ [ t ( translations . buildDate ) ] : new Date ( release . buildTime ) . toLocaleDateString ( resolvedLanguage , {
73+ dateStyle : 'long'
74+ } ) ,
6875 [ t ( translations . buildType ) ] : t ( translations . buildTypes [ release . type ] ) ,
6976 [ t ( translations . version ) ] : release . version
7077 } ;
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ export async function getReleaseInfo(): Promise<ReleaseInfo> {
3333 if ( process . env . NODE_ENV === 'development' || process . env . NODE_ENV === 'test' ) {
3434 return $DevelopmentReleaseInfo . parseAsync ( {
3535 branch : await getGitBranch ( ) ,
36+ buildTime : Date . now ( ) ,
3637 commit : await getGitCommit ( ) ,
3738 type : process . env . NODE_ENV ,
3839 version : await fs
@@ -42,6 +43,7 @@ export async function getReleaseInfo(): Promise<ReleaseInfo> {
4243 } satisfies DevelopmentReleaseInfo ) ;
4344 } else if ( process . env . NODE_ENV === 'production' ) {
4445 return $ProductionReleaseInfo . parseAsync ( {
46+ buildTime : Date . now ( ) ,
4547 type : 'production' ,
4648 version : process . env . RELEASE_VERSION !
4749 } satisfies ProductionReleaseInfo ) ;
Original file line number Diff line number Diff line change @@ -7,13 +7,15 @@ export const $ReleaseVersion = z.string().regex(/[0-9]+.[0-9]+.[0-9]+/);
77export type DevelopmentReleaseInfo = z . infer < typeof $DevelopmentReleaseInfo > ;
88export const $DevelopmentReleaseInfo = z . object ( {
99 branch : z . string ( ) . min ( 1 ) ,
10+ buildTime : z . number ( ) ,
1011 commit : z . string ( ) . length ( 8 ) ,
1112 type : z . enum ( [ 'development' , 'test' ] ) ,
1213 version : $ReleaseVersion
1314} ) ;
1415
1516export type ProductionReleaseInfo = z . infer < typeof $ProductionReleaseInfo > ;
1617export const $ProductionReleaseInfo = z . object ( {
18+ buildTime : z . number ( ) ,
1719 type : z . literal ( 'production' ) ,
1820 version : $ReleaseVersion
1921} ) ;
You can’t perform that action at this time.
0 commit comments