feat:参照研听的基础工程

This commit is contained in:
jingyun
2026-06-18 15:02:28 +08:00
commit 364fc837b3
367 changed files with 16495 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# 金值 Flutter web release 构建。产物输出到 build/web。
# 参数(环境变量覆盖):
# API_BASE_URL 接口地址(默认生产 API)
# BASE_HREF base href(默认 /flutter/
set -euo pipefail
API_BASE_URL="${API_BASE_URL:-https://jinzhi.api.local}"
BASE_HREF="${BASE_HREF:-/flutter/}"
echo "▶ flutter pub get"
flutter pub get
make runner
echo "▶ flutter build webbase-href=${BASE_HREF}api=${API_BASE_URL}"
flutter build web --release \
--base-href "$BASE_HREF" \
--dart-define=JINZHI_API_BASE_URL="$API_BASE_URL"
echo "✅ 构建完成 → build/web"