From ed479b7efad740df72418c12458e874b9ed6b637 Mon Sep 17 00:00:00 2001 From: nite Date: Sun, 19 Oct 2025 03:23:43 +1100 Subject: [PATCH] workflow: pass version arg to builder --- .goreleaser.yaml | 2 +- Containerfile | 2 +- server/frontend/src/app.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index ee73d31..39f7860 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -19,7 +19,7 @@ builds: pre: - cmd: npm install dir: server/frontend - - cmd: APP_VERSION={{ .Version }} npm run build + - cmd: VITE_APP_VERSION={{ .Version }} npm run build dir: server/frontend archives: - formats: ["tar.gz"] diff --git a/Containerfile b/Containerfile index 118d178..4fccbb6 100644 --- a/Containerfile +++ b/Containerfile @@ -4,7 +4,7 @@ COPY server/frontend/package*.json ./ RUN npm install COPY server/frontend . ARG version -RUN APP_VERSION=${version} npm run build +RUN VITE_APP_VERSION=${version} npm run build FROM golang:1.25 as builder LABEL authors="nite07" diff --git a/server/frontend/src/app.ts b/server/frontend/src/app.ts index 7c26449..d4c18c8 100644 --- a/server/frontend/src/app.ts +++ b/server/frontend/src/app.ts @@ -698,7 +698,7 @@ export class Sub2clashApp extends LitElement { >sub2clash

-

Version: ${import.meta.env.APP_VERSION ?? "dev"}

+

Version: ${import.meta.env.VITE_APP_VERSION ?? "dev"}

`;