File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,12 +3,16 @@ ARG NODE_VERSION=22.16.0
33
44FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION} AS base
55
6+ ARG APP_VERSION
7+ ARG GIT_SHA
8+
69ENV SKIP_ENV_VALIDATION="true"
710ENV DOCKER_OUTPUT=1
811ENV NEXT_TELEMETRY_DISABLED=1
912ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
10- ENV APP_VERSION=${APP_VERSION}
11- ENV GIT_SHA=${GIT_SHA}
13+
14+ ENV NEXT_PUBLIC_APP_VERSION=${APP_VERSION}
15+ ENV NEXT_PUBLIC_GIT_SHA=${GIT_SHA}
1216
1317RUN apk update && apk add --no-cache libc6-compat
1418
@@ -24,9 +28,6 @@ RUN pnpm build
2428
2529FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION} AS release
2630
27- ARG APP_VERSION
28- ARG GIT_SHA
29-
3031ENV NODE_ENV=production
3132ENV DOCKER_OUTPUT=1
3233
@@ -43,8 +44,6 @@ COPY --from=base /app/prisma/migrations ./prisma/migrations
4344
4445# set this so it throws error where starting server
4546ENV SKIP_ENV_VALIDATION="false"
46- ENV APP_VERSION=${APP_VERSION}
47- ENV GIT_SHA=${GIT_SHA}
4847
4948COPY ./start.sh ./start.sh
5049
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export const DebugInfo: React.FC<React.PropsWithChildren> = ({ children }) => {
3535 }
3636 } ;
3737
38- if ( env . NEXT_PUBLIC_VERSION ) {
38+ if ( env . NEXT_PUBLIC_APP_VERSION ) {
3939 void fetchLatestVersion ( ) ;
4040 }
4141 } , [ ] ) ;
@@ -46,8 +46,8 @@ export const DebugInfo: React.FC<React.PropsWithChildren> = ({ children }) => {
4646 if ( env . NEXT_PUBLIC_GIT_SHA ) {
4747 debugInfo . push ( `${ t ( 'account.debug_info_details.git' ) } : ${ env . NEXT_PUBLIC_GIT_SHA } ` ) ;
4848 }
49- if ( env . NEXT_PUBLIC_VERSION ) {
50- debugInfo . push ( `${ t ( 'account.debug_info_details.version' ) } ${ env . NEXT_PUBLIC_VERSION } ` ) ;
49+ if ( env . NEXT_PUBLIC_APP_VERSION ) {
50+ debugInfo . push ( `${ t ( 'account.debug_info_details.version' ) } ${ env . NEXT_PUBLIC_APP_VERSION } ` ) ;
5151 }
5252 try {
5353 void navigator . clipboard . writeText ( debugInfo . join ( '\n' ) ) ;
@@ -78,10 +78,12 @@ export const DebugInfo: React.FC<React.PropsWithChildren> = ({ children }) => {
7878 />
7979 < DebugInfoRow
8080 label = { t ( 'account.debug_info_details.version' ) }
81- value = { env . NEXT_PUBLIC_VERSION }
81+ value = { env . NEXT_PUBLIC_APP_VERSION }
8282 className = "mt-4"
8383 />
84- { newVersion && env . NEXT_PUBLIC_VERSION && newVersion !== env . NEXT_PUBLIC_VERSION ? (
84+ { newVersion &&
85+ env . NEXT_PUBLIC_APP_VERSION &&
86+ newVersion !== env . NEXT_PUBLIC_APP_VERSION ? (
8587 < p className = "mt-4 text-sm text-yellow-600" >
8688 { t ( 'account.debug_info_details.new_version_available' ) } : { newVersion }
8789 </ p >
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ export const env = createEnv({
8080 * `NEXT_PUBLIC_`. Note that these are only evaluated at build time!
8181 */
8282 client : {
83- NEXT_PUBLIC_VERSION : z . string ( ) . optional ( ) ,
83+ NEXT_PUBLIC_APP_VERSION : z . string ( ) . optional ( ) ,
8484 NEXT_PUBLIC_GIT_SHA : z . string ( ) . optional ( ) ,
8585 } ,
8686
@@ -143,8 +143,8 @@ export const env = createEnv({
143143 UPLOAD_MAX_FILE_SIZE_MB : process . env . UPLOAD_MAX_FILE_SIZE_MB
144144 ? Number ( process . env . UPLOAD_MAX_FILE_SIZE_MB )
145145 : 10 ,
146- NEXT_PUBLIC_VERSION : process . env . APP_VERSION ,
147- NEXT_PUBLIC_GIT_SHA : process . env . GIT_SHA ,
146+ NEXT_PUBLIC_APP_VERSION : process . env . NEXT_PUBLIC_APP_VERSION ,
147+ NEXT_PUBLIC_GIT_SHA : process . env . NEXT_PUBLIC_GIT_SHA ,
148148 } ,
149149 /**
150150 * Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially
You can’t perform that action at this time.
0 commit comments