Skip to content

Commit 85b2bfc

Browse files
fix: CIワークフローのコード生成コマンドを修正
- build_runnerの実行コマンドをdartからflutterに変更し、正しい環境でのコード生成を実施
1 parent 1c8a05e commit 85b2bfc

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

.github/workflows/ci.yaml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,26 @@ jobs:
6868
- name: Codegen verify (only latest)
6969
if: matrix.flutter == '3.32.x'
7070
run: |
71-
dart run build_runner build -d --build-filter="lib/**"
71+
set -e
72+
# Locate frontend_server snapshot across engine layouts
73+
SNAP=""
74+
for C in \
75+
"$FLUTTER_ROOT/bin/cache/artifacts/engine/linux-x64/frontend_server.dart.snapshot" \
76+
"$FLUTTER_ROOT/bin/cache/artifacts/engine/common/frontend_server.dart.snapshot"; do
77+
if [ -f "$C" ]; then SNAP="$C"; break; fi
78+
done
79+
if [ -z "$SNAP" ]; then
80+
SNAP=$(find "$FLUTTER_ROOT/bin/cache/artifacts/engine" -name frontend_server.dart.snapshot | head -n1 || true)
81+
fi
82+
if [ -z "$SNAP" ] || [ ! -f "$SNAP" ]; then
83+
echo 'frontend_server snapshot not found'
84+
ls -R "$FLUTTER_ROOT/bin/cache/artifacts/engine" || true
85+
exit 1
86+
fi
87+
export FLUTTER_FRONTEND_SERVER_SNAPSHOT="$SNAP"
88+
echo "Using frontend_server: $FLUTTER_FRONTEND_SERVER_SNAPSHOT"
89+
flutter pub get
90+
flutter pub run build_runner build -d --build-filter="lib/**"
7291
git diff --exit-code || (echo 'Codegen produced changes. Please commit generated files.' && exit 1)
7392
7493
example-android:

0 commit comments

Comments
 (0)