Skip to content

Commit

Permalink
add script
Browse files Browse the repository at this point in the history
  • Loading branch information
ho2ri2s committed Jun 8, 2020
1 parent 669fc90 commit 7a1ec97
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
flutter-version: '1.17.3'
channel: 'stable'
- name: Flutter analyze
run: flutter analyze > flutter_analyze_report.txt
run: ./scripts/analyze.sh
- name: Cache bundle
uses: actions/cache@v1
with:
Expand Down
11 changes: 11 additions & 0 deletions scripts/analyze.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
result=$(flutter analyze)
if [ $? -ne 0 ]; then
echo "$result" | grep -E 'error.+\.dart:\d+:\d+'
if [ $? -eq 0 ]; then
echo "$result"
exit 1
fi
fi
echo "$result" > flutter_analyze_report.txt
echo "$result"
exit 0

0 comments on commit 7a1ec97

Please sign in to comment.