mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
ci: fix app version build arg
This commit is contained in:
@@ -60,7 +60,6 @@ CMD ["bun", "run", "dev"]
|
|||||||
FROM oven/bun:${BUN_VERSION} AS builder
|
FROM oven/bun:${BUN_VERSION} AS builder
|
||||||
|
|
||||||
ARG APP_VERSION=dev
|
ARG APP_VERSION=dev
|
||||||
ENV VITE_APP_VERSION=${APP_VERSION}
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
@@ -69,6 +68,9 @@ RUN bun install --frozen-lockfile
|
|||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
RUN touch .env
|
||||||
|
RUN echo "VITE_APP_VERSION=${APP_VERSION}" >> .env
|
||||||
|
|
||||||
RUN bun run build
|
RUN bun run build
|
||||||
|
|
||||||
FROM base AS production
|
FROM base AS production
|
||||||
|
|||||||
@@ -4,15 +4,8 @@ import { defineConfig } from "vite";
|
|||||||
import tsconfigPaths from "vite-tsconfig-paths";
|
import tsconfigPaths from "vite-tsconfig-paths";
|
||||||
import { reactRouterHonoServer } from "react-router-hono-server/dev";
|
import { reactRouterHonoServer } from "react-router-hono-server/dev";
|
||||||
|
|
||||||
const getVersion = () => {
|
|
||||||
return process.env.VITE_APP_VERSION || "dev";
|
|
||||||
};
|
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [reactRouterHonoServer({ runtime: "bun" }), reactRouter(), tailwindcss(), tsconfigPaths()],
|
plugins: [reactRouterHonoServer({ runtime: "bun" }), reactRouter(), tailwindcss(), tsconfigPaths()],
|
||||||
define: {
|
|
||||||
"import.meta.env.VITE_APP_VERSION": JSON.stringify(getVersion()),
|
|
||||||
},
|
|
||||||
build: {
|
build: {
|
||||||
outDir: "dist",
|
outDir: "dist",
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user