Fix docker build

This commit is contained in:
世界 2024-10-12 00:37:03 +08:00
parent fedd57131f
commit fe3c2b4bdf
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4

View File

@ -11,7 +11,7 @@ ENV GOARCH=$TARGETARCH
RUN set -ex \ RUN set -ex \
&& apk add git build-base \ && apk add git build-base \
&& export COMMIT=$(git rev-parse --short HEAD) \ && export COMMIT=$(git rev-parse --short HEAD) \
&& export VERSION=$(go run ./cmd/internal/read_tag) \ && export VERSION=$(go run github.com/sagernet/sing-box/cmd/internal/read_tag@latest) \
&& go build -v -trimpath \ && go build -v -trimpath \
-o /go/bin/serenity \ -o /go/bin/serenity \
-ldflags "-X \"github.com/sagernet/serenity/cmd/serenity.Version=$VERSION\" -s -w -buildid=" \ -ldflags "-X \"github.com/sagernet/serenity/cmd/serenity.Version=$VERSION\" -s -w -buildid=" \