From 70273a7a2ff5bffaeb4e229b5f8e435eb92def96 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Thu, 21 Oct 2021 00:55:28 -0400 Subject: [PATCH] fixed output --- entrypoint.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 9e9358d80db..4fbf03c6187 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -125,23 +125,23 @@ else ALL_MODIFIED_ARRAY=("${ALL_MODIFIED_ARRAY[@]}" "${ALL_MODIFIED_CURRENT_ARRAY[@]}") done - ADDED=$(IFS=$INPUT_SEPARATOR; eval 'echo "${ADDED_ARRAY[*]}" | tr " " "\n" | sort -u | xargs -0') - COPIED=$(IFS=$INPUT_SEPARATOR; eval 'echo "${COPIED_ARRAY[*]}" | tr " " "\n" | sort -u | xargs -0') - DELETED=$(IFS=$INPUT_SEPARATOR; eval 'echo "${DELETED_ARRAY[*]}" | tr " " "\n" | sort -u | xargs -0') - MODIFIED=$(IFS=$INPUT_SEPARATOR; eval 'echo "${MODIFIED_ARRAY[*]}" | tr " " "\n" | sort -u | xargs -0') - RENAMED=$(IFS=$INPUT_SEPARATOR; eval 'echo "${RENAMED_ARRAY[*]}" | tr " " "\n" | sort -u | xargs -0') - TYPE_CHANGED=$(IFS=$INPUT_SEPARATOR; eval 'echo "${TYPE_CHANGED_ARRAY[*]}" | tr " " "\n" | sort -u | xargs -0') - UNMERGED=$(IFS=$INPUT_SEPARATOR; eval 'echo "${UNMERGED_ARRAY[*]}" | tr " " "\n" | sort -u | xargs -0') - UNKNOWN=$(IFS=$INPUT_SEPARATOR; eval 'echo "${UNKNOWN_ARRAY[*]}" | tr " " "\n" | sort -u | xargs -0') - ALL_CHANGED_AND_MODIFIED=$(IFS=$INPUT_SEPARATOR; eval 'echo "${ALL_CHANGED_AND_MODIFIED_ARRAY[*]}" | tr " " "\n" | sort -u | xargs -0') - ALL_MODIFIED=$(IFS=$INPUT_SEPARATOR; eval 'echo "${ALL_MODIFIED_ARRAY[*]}" | tr " " "\n" | sort -u | xargs -0') + ADDED=$(IFS=$INPUT_SEPARATOR; eval 'echo "${ADDED_ARRAY[*]}"') + COPIED=$(IFS=$INPUT_SEPARATOR; eval 'echo "${COPIED_ARRAY[*]}"') + DELETED=$(IFS=$INPUT_SEPARATOR; eval 'echo "${DELETED_ARRAY[*]}"') + MODIFIED=$(IFS=$INPUT_SEPARATOR; eval 'echo "${MODIFIED_ARRAY[*]}"') + RENAMED=$(IFS=$INPUT_SEPARATOR; eval 'echo "${RENAMED_ARRAY[*]}"') + TYPE_CHANGED=$(IFS=$INPUT_SEPARATOR; eval 'echo "${TYPE_CHANGED_ARRAY[*]}"') + UNMERGED=$(IFS=$INPUT_SEPARATOR; eval 'echo "${UNMERGED_ARRAY[*]}"') + UNKNOWN=$(IFS=$INPUT_SEPARATOR; eval 'echo "${UNKNOWN_ARRAY[*]}"') + ALL_CHANGED_AND_MODIFIED=$(IFS=$INPUT_SEPARATOR; eval 'echo "${ALL_CHANGED_AND_MODIFIED_ARRAY[*]}"') + ALL_MODIFIED=$(IFS=$INPUT_SEPARATOR; eval 'echo "${ALL_MODIFIED_ARRAY[*]}"') ALL_OTHER_MODIFIED=$(git diff --diff-filter="ACMR" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA") - IFS=" " read -r -a UNIQUE_ALL_MODIFIED_ARRAY <<< "$(echo "${ALL_MODIFIED_ARRAY[*]}" | tr " " "\n" | sort -u | xargs -0)" + IFS=" " read -r -a UNIQUE_ALL_MODIFIED_ARRAY <<< "${ALL_MODIFIED_ARRAY[*]}" IFS=" " read -r -a OTHER_MODIFIED_ARRAY <<< "$(echo "${ALL_OTHER_MODIFIED[@]}" "${UNIQUE_ALL_MODIFIED_ARRAY[@]}" | tr " " "\n" | sort | uniq -u | xargs -0)" - OTHER_MODIFIED=$(IFS=$INPUT_SEPARATOR; eval 'echo "${OTHER_MODIFIED_ARRAY[*]}" | tr " " "\n" | sort -u | xargs -0') + OTHER_MODIFIED=$(IFS=$INPUT_SEPARATOR; eval 'echo "${OTHER_MODIFIED_ARRAY[*]}"') echo "Matching modified files: ${UNIQUE_ALL_MODIFIED_ARRAY[*]}" @@ -161,10 +161,10 @@ else OTHER_DELETED=$(git diff --diff-filter=D --name-only "$PREVIOUS_SHA" "$CURRENT_SHA") - IFS=" " read -r -a UNIQUE_DELETED_ARRAY <<< "$(echo "${DELETED_ARRAY[*]}" | tr " " "\n" | sort -u | xargs -0)" + IFS=" " read -r -a UNIQUE_DELETED_ARRAY <<< "${DELETED_ARRAY[*]}" IFS=" " read -r -a OTHER_DELETED_ARRAY <<< "$(echo "${OTHER_DELETED[@]}" "${UNIQUE_DELETED_ARRAY[@]}" | tr " " "\n" | sort | uniq -u | xargs -0)" - OTHER_DELETED=$(IFS=$INPUT_SEPARATOR; eval 'echo "${OTHER_DELETED_ARRAY[*]}" | tr " " "\n" | sort -u | xargs -0') + OTHER_DELETED=$(IFS=$INPUT_SEPARATOR; eval 'echo "${OTHER_DELETED_ARRAY[*]}"') echo "Matching deleted files: ${UNIQUE_DELETED_ARRAY[*]}"