Skip to content

Commit

Permalink
feat: add support for detecting deleted files (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Jun 22, 2022
1 parent 1356a8e commit fa6ea30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ git config --local core.autocrlf "$INPUT_AUTO_CRLF"
if [[ -n "$INPUT_FILES" ]]; then
echo "Checking for file changes: \"${INPUT_FILES}\"..."

TRACKED_FILES=$(git diff --diff-filter=ACMUXTR --name-only | grep -E "(${INPUT_FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
TRACKED_FILES=$(git diff --diff-filter=ACMUXTRD --name-only | grep -E "(${INPUT_FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')

# Find untracked changes
UNTRACKED_FILES=$(git ls-files --others --exclude-standard | grep -E "(${INPUT_FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
else
TRACKED_FILES=$(git diff --diff-filter=ACMUXTR --name-only | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
TRACKED_FILES=$(git diff --diff-filter=ACMUXTRD --name-only | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')

# Find untracked changes
UNTRACKED_FILES=$(git ls-files --others --exclude-standard | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
Expand Down

0 comments on commit fa6ea30

Please sign in to comment.