3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2024-12-17 13:47:20 +00:00

Added visual spacing.

This commit is contained in:
Tonye Jack 2021-05-06 17:31:39 -04:00 committed by GitHub
parent 9dbc29a0f2
commit d183729cfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,7 +72,9 @@ runs:
git fetch --depth=1 origin "${TARGET_BRANCH}":"${TARGET_BRANCH}"
HEAD_SHA=$(git rev-parse "${TARGET_BRANCH}" || true)
fi
echo "Using head sha: $HEAD_SHA..."
if [[ -z "$INPUT_FILES" ]]; then
echo "Getting diff..."
ADDED=$(git diff --diff-filter=A --name-only "$HEAD_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
@ -96,6 +98,7 @@ runs:
UNKNOWN_ARRAY=()
ALL_CHANGED_ARRAY=()
ALL_MODIFIED_FILES_ARRAY=()
for path in ${INPUT_FILES}
do
echo "Checking for file changes: \"${path}\"..."
@ -122,7 +125,6 @@ runs:
UNKNOWN=$(echo "${UNKNOWN_ARRAY[@]}" | sed -E "s/($INPUT_SEPARATOR)$//" | xargs)
ALL_CHANGED=$(echo "${ALL_CHANGED_ARRAY[@]}" | sed -E "s/($INPUT_SEPARATOR)$//" | xargs)
ALL_MODIFIED_FILES=$(echo "${ALL_MODIFIED_FILES_ARRAY[@]}" | sed -E "s/($INPUT_SEPARATOR)$//" | xargs)
fi
echo "Added files: $ADDED"
@ -165,6 +167,7 @@ runs:
echo "::set-output name=any_changed::false"
fi
fi
echo "::set-output name=added_files::$ADDED"
echo "::set-output name=copied_files::$COPIED"
echo "::set-output name=deleted_files::$DELETED"