fix(build): embed frontend into driver_http dist

Copy the static export to backend/plugins/drivers/driver_http/dist so
Wavelet's //go:embed all:dist actually ships the OpenFlare UI. Point
release builds at backend/go.mod and assert index.html after copy.
This commit is contained in:
ryan
2026-08-30 15:00:30 +08:00
parent df271ff708
commit 220c469ee7
7 changed files with 46 additions and 22 deletions
+3 -2
View File
@@ -29,8 +29,9 @@ build-embedded:
NEXT_PUBLIC_APP_VERSION="$(VERSION)" \
NEXT_PUBLIC_APP_BUILD_DATE="$(BUILD_DATE)" \
pnpm build:embed
rm -rf backend/OpenFlare/plugins/server/router/root/dist
cp -R frontend/out backend/OpenFlare/plugins/server/router/root/dist
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)'" \