ci: fix app version build arg
Some checks failed
Release Workflow / determine-release-type (push) Has been cancelled
Release Workflow / build-images (push) Has been cancelled
Release Workflow / publish-release (push) Has been cancelled

This commit is contained in:
Nicolas Meienberger 2025-11-16 17:11:30 +01:00
parent a3e027694a
commit ed2a625fa7
2 changed files with 3 additions and 8 deletions

View file

@ -60,7 +60,6 @@ CMD ["bun", "run", "dev"]
FROM oven/bun:${BUN_VERSION} AS builder
ARG APP_VERSION=dev
ENV VITE_APP_VERSION=${APP_VERSION}
WORKDIR /app
@ -69,6 +68,9 @@ RUN bun install --frozen-lockfile
COPY . .
RUN touch .env
RUN echo "VITE_APP_VERSION=${APP_VERSION}" >> .env
RUN bun run build
FROM base AS production

View file

@ -4,15 +4,8 @@ import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import { reactRouterHonoServer } from "react-router-hono-server/dev";
const getVersion = () => {
return process.env.VITE_APP_VERSION || "dev";
};
export default defineConfig({
plugins: [reactRouterHonoServer({ runtime: "bun" }), reactRouter(), tailwindcss(), tsconfigPaths()],
define: {
"import.meta.env.VITE_APP_VERSION": JSON.stringify(getVersion()),
},
build: {
outDir: "dist",
sourcemap: true,