Skip to content

Commit b617967

Browse files
authored
Merge pull request #22 from planetscale/jw-multi-patterns
2 parents 388d54c + a59f7b5 commit b617967

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

entrypoint.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@ COMMIT_MESSAGE="${1:?Missing commit_message input}"
77
REPO="${2:?Missing repo input}"
88
BRANCH="${3:?Missing branch input}"
99
EMPTY="${4:-false}"
10-
FILE_PATTERN="${5:?Missing file_pattern input}"
10+
read -r -a FILE_PATTERNS <<<"${5:?Missing file_pattern input}"
1111

1212
git config --global --add safe.directory "$GITHUB_WORKSPACE"
1313

1414
adds=()
1515
deletes=()
1616

17-
# shellcheck disable=SC2086
1817
while IFS= read -r -d $'\0' line; do
1918
[[ -n "${DEBUG:-}" ]] && echo "line: '$line'"
2019

@@ -54,7 +53,7 @@ while IFS= read -r -d $'\0' line; do
5453
# handle deletes (D):
5554
[[ "$tree_status" =~ D || "$index_status" =~ D ]] && deletes+=("$filename")
5655

57-
done < <(git status -s --porcelain=v1 -z -- $FILE_PATTERN)
56+
done < <(git status -s --porcelain=v1 -z -- "${FILE_PATTERNS[@]}")
5857

5958
if [[ "${#adds[@]}" -eq 0 && "${#deletes[@]}" -eq 0 && "$EMPTY" == "false" ]]; then
6059
echo "No changes detected, exiting"

0 commit comments

Comments
 (0)