feat: 构建版本
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
ARG VERSION=1.0.0
|
||||
WORKDIR /build
|
||||
COPY ./web .
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
RUN VITE_VERSION=${VERSION} npm run build
|
||||
|
||||
|
||||
FROM golang:alpine AS builder2
|
||||
|
||||
ARG VERSION=1.0.0
|
||||
ENV GO111MODULE=on \
|
||||
CGO_ENABLED=0 \
|
||||
GOOS=linux
|
||||
@@ -19,7 +21,7 @@ RUN go mod download
|
||||
|
||||
COPY . .
|
||||
COPY --from=builder /build/dist ./web/dist
|
||||
RUN go build -ldflags "-s -w " -o gpt-load
|
||||
RUN go build -ldflags "-s -w -X gpt-load/internal/version.Version=${VERSION}" -o gpt-load
|
||||
|
||||
|
||||
FROM alpine
|
||||
|
Reference in New Issue
Block a user