Update development script (#16623)

This commit is contained in:
Wang Qi
2026-07-03 20:34:30 +08:00
committed by GitHub
parent 63a4ed55d8
commit 06aa169df7
6 changed files with 15 additions and 11 deletions

View File

@@ -135,7 +135,9 @@ jobs:
trap 'rm -f "$changed_files"' EXIT
git diff --name-only ${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }} \
| while read -r file; do
[[ -f "$file" ]] && printf '%s\0' "$file"
if [[ -f "$file" ]]; then
printf '%s\0' "$file"
fi
done > "$changed_files"
echo "Changed files to run lefthook on:"
if [[ -s "$changed_files" ]]; then
@@ -1120,4 +1122,4 @@ jobs:
fi
if [[ -n ${PORT_RESERVATION:-} ]]; then
rm -f "${PORT_RESERVATION}"
fi
fi

View File

@@ -100,7 +100,9 @@ jobs:
trap 'rm -f "$changed_files"' EXIT
git diff --name-only ${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }} \
| while read -r file; do
[[ -f "$file" ]] && printf '%s\0' "$file"
if [[ -f "$file" ]]; then
printf '%s\0' "$file"
fi
done > "$changed_files"
echo "Changed files to run lefthook on:"
if [[ -s "$changed_files" ]]; then