mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-07 16:16:37 +08:00
fix(docker): repair embed packaging for backend/ module layout
The Dockerfiles and the release workflow still assumed the pre-refactor tree: go.mod, go.sum and main.go now live under backend/, so `COPY go.mod go.sum` failed outright, and the Go module is the bare `Wavelet`, so the buildinfo ldflags pointed at github.com/Rain-kl/Wavelet and stamped nothing. The frontend export was also overlaid onto ./plugins/... rather than the driver_http path that `//go:embed all:dist` actually reads. Repoint every packaging path at backend/, correct the ldflags module prefix, and assert dist/index.html in both docker stages, in build-embedded and in the release workflow, so a silently empty static export can no longer ship an API-only binary. Also carry pnpm-workspace.yaml into the cached install layer.
This commit is contained in:
@@ -27,6 +27,7 @@ build-embedded:
|
||||
pnpm build:embed
|
||||
rm -rf backend/plugins/drivers/driver_http/dist
|
||||
cp -R frontend/out backend/plugins/drivers/driver_http/dist
|
||||
test -f backend/plugins/drivers/driver_http/dist/index.html
|
||||
cd backend && go build \
|
||||
-tags embed_frontend \
|
||||
-ldflags "-s -w -X '$(MODULE)/pkg/buildinfo.Version=$(VERSION)' -X '$(MODULE)/pkg/buildinfo.BuildTime=$(BUILD_DATE)'" \
|
||||
|
||||
Reference in New Issue
Block a user