mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-04 23:16:37 +08:00
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:
@@ -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)'" \
|
||||
|
||||
Reference in New Issue
Block a user