Fix version display in side navigation (#306)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
KM Koushik
2025-12-08 09:19:37 +11:00
committed by GitHub
parent 3e3f6d521a
commit 7fdb82a9e9
+8 -9
View File
@@ -30,13 +30,20 @@ RUN apk add --no-cache libc6-compat
RUN apk update RUN apk update
WORKDIR /app WORKDIR /app
# First install the dependencies (as they change less often) # First install the dependencies (as they change less often)
COPY .gitignore .gitignore COPY .gitignore .gitignore
COPY --from=builder /app/out/json/ . COPY --from=builder /app/out/json/ .
COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
# Build arguments for version information
# Placed after install to preserve dependency cache when version changes
ARG APP_VERSION=unknown
ARG GIT_SHA=unknown
# Set version as environment variables for Next.js build
ENV NEXT_PUBLIC_APP_VERSION=$APP_VERSION
ENV NEXT_PUBLIC_GIT_SHA=$GIT_SHA
# Build the project # Build the project
COPY --from=builder /app/out/full/ . COPY --from=builder /app/out/full/ .
@@ -46,14 +53,6 @@ RUN pnpm turbo run build --filter=web...
FROM base AS runner FROM base AS runner
WORKDIR /app WORKDIR /app
# Build arguments for version information
ARG APP_VERSION=unknown
ARG GIT_SHA=unknown
# Set version as environment variables
ENV NEXT_PUBLIC_APP_VERSION=$APP_VERSION
ENV NEXT_PUBLIC_GIT_SHA=$GIT_SHA
COPY --from=installer /app/apps/web/next.config.js . COPY --from=installer /app/apps/web/next.config.js .
COPY --from=installer /app/apps/web/package.json . COPY --from=installer /app/apps/web/package.json .
COPY --from=installer /app/pnpm-lock.yaml . COPY --from=installer /app/pnpm-lock.yaml .