diff --git a/Dockerfile b/Dockerfile index b25316c..33f5f92 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,14 @@ FROM oven/bun:1 AS builder +ARG VERSION +ARG COMMIT + WORKDIR /app COPY . . +ENV APP_VERSION=${VERSION} \ + APP_COMMIT=${COMMIT} + RUN bun install --frozen-lockfile && \ bun run build diff --git a/src/components/layout/AppFooter.vue b/src/components/layout/AppFooter.vue index 9edc681..1b7dfc1 100644 --- a/src/components/layout/AppFooter.vue +++ b/src/components/layout/AppFooter.vue @@ -1,7 +1,14 @@ @@ -12,13 +19,29 @@ const { data: versionData } = useVersion() >
- Ory Admin UI v{{ appVersion }} + Ory Admin UI {{ appVersion }} + + Ory Admin UI {{ appVersion }} + + · {
diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts index 6c40c08..b00d3ef 100644 --- a/src/vite-env.d.ts +++ b/src/vite-env.d.ts @@ -1,6 +1,7 @@ /// declare const __APP_VERSION__: string +declare const __APP_COMMIT__: string declare module "*.vue" { import type { DefineComponent } from "vue" diff --git a/vite.config.ts b/vite.config.ts index 792087b..185adc0 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -9,7 +9,8 @@ export default defineConfig(({ mode }) => { const env = loadEnv(mode, process.cwd(), "") return { define: { - __APP_VERSION__: JSON.stringify(version), + __APP_VERSION__: JSON.stringify(env.APP_VERSION || version), + __APP_COMMIT__: JSON.stringify(env.APP_COMMIT || ""), }, plugins: [ vue(),