Skip to content

Commit 5ebb90d

Browse files
committed
fix(ci): improve file count consistency check with detailed diff output
1 parent eccb182 commit 5ebb90d

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,11 @@ jobs:
217217
run: |
218218
echo "Checking .md file count consistency for gsd commands..."
219219
220-
src_count=$(find ./src/get-shit-done/commands/gsd -name "*.md" -type f 2>/dev/null | wc -l)
221-
gsd_count=$(find ./gsd-opencode/command/gsd -name "*.md" -type f 2>/dev/null | wc -l)
220+
src_files=$(find ./src/get-shit-done/commands/gsd -name "*.md" -type f 2>/dev/null | sort)
221+
gsd_files=$(find ./gsd-opencode/command/gsd -name "*.md" -type f 2>/dev/null | sort)
222+
223+
src_count=$(echo "$src_files" | wc -l)
224+
gsd_count=$(echo "$gsd_files" | wc -l)
222225
223226
echo "Source directory (./src/get-shit-done/commands/gsd): $src_count .md files"
224227
echo "GSD directory (./gsd-opencode/command/gsd): $gsd_count .md files"
@@ -231,8 +234,14 @@ jobs:
231234
echo " Difference: $difference files"
232235
if [ "$src_count" -gt "$gsd_count" ]; then
233236
echo " Source has $difference more files than GSD directory"
237+
echo ""
238+
echo "Files in source but not in GSD directory:"
239+
comm -23 <(echo "$src_files" | sed 's|.*/||') <(echo "$gsd_files" | sed 's|.*/||')
234240
else
235241
echo " GSD directory has $((-difference)) more files than source"
242+
echo ""
243+
echo "Files in GSD directory but not in source:"
244+
comm -13 <(echo "$src_files" | sed 's|.*/||') <(echo "$gsd_files" | sed 's|.*/||')
236245
fi
237246
exit 1
238247
fi

0 commit comments

Comments
 (0)