mirror of
https://github.com/bestnite/sub2clash.git
synced 2025-10-26 01:01:35 +00:00
workflow: pass version arg to builder
This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -698,7 +698,7 @@ export class Sub2clashApp extends LitElement {
|
||||
>sub2clash</a
|
||||
>
|
||||
</p>
|
||||
<p>Version: ${import.meta.env.APP_VERSION ?? "dev"}</p>
|
||||
<p>Version: ${import.meta.env.VITE_APP_VERSION ?? "dev"}</p>
|
||||
</aside>
|
||||
</footer>
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user