Skip to content

Commit 7bd6dec

Browse files
committed
ci: Enhance formatting command to display changed files during analysis
1 parent 602275f commit 7bd6dec

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,17 @@ jobs:
4949
run: dart analyze packages/dart --fatal-infos
5050
- name: Lint
5151
run: dart format packages/dart
52-
- name: Show formatted files
52+
- name: Print contents of changed Dart files
5353
run: |
54-
git diff --name-only | grep '\.dart$' | while read file; do
55-
echo "Changed $file:"
56-
cat "$file"
57-
echo ""
54+
echo "Listing changed .dart files:"
55+
changed_files=$(git diff --name-only)
56+
57+
for file in $changed_files; do
58+
if [[ "$file" == *.dart ]]; then
59+
echo "===== Changed: $file ====="
60+
cat "$file"
61+
echo ""
62+
fi
5863
done
5964
- name: Publish dry run
6065
run: cd packages/dart && dart pub publish --dry-run

0 commit comments

Comments
 (0)