mirror of
https://github.com/tj-actions/changed-files
synced 2024-12-17 03:47:20 +00:00
Rename changed_files to type_changed_files (#109)
This commit is contained in:
parent
d290bdd91e
commit
0754fdabe3
3 changed files with 10 additions and 10 deletions
|
@ -86,7 +86,7 @@ jobs:
|
|||
| deleted_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Deleted (D) |
|
||||
| modified_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Modified (M) |
|
||||
| renamed_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Renamed (R) |
|
||||
| changed_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that have their file type changed (T) |
|
||||
| type_changed_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that have their file type changed (T) |
|
||||
| unmerged_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Unmerged (U) |
|
||||
| unknown_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Unknown (X) |
|
||||
|
||||
|
|
|
@ -31,9 +31,9 @@ outputs:
|
|||
renamed_files:
|
||||
description: List of renamed files.
|
||||
value: ${{ steps.changed-files.outputs.renamed_files }}
|
||||
changed_files:
|
||||
description: List of changed files.
|
||||
value: ${{ steps.changed-files.outputs.changed_files }}
|
||||
type_changed_files:
|
||||
description: List of files that had type changes.
|
||||
value: ${{ steps.changed-files.outputs.type_changed_files }}
|
||||
unmerged_files:
|
||||
description: List of unmerged files.
|
||||
value: ${{ steps.changed-files.outputs.unmerged_files }}
|
||||
|
|
|
@ -45,7 +45,7 @@ if [[ -z "$INPUT_FILES" ]]; then
|
|||
DELETED=$(git diff --diff-filter=D --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
|
||||
MODIFIED=$(git diff --diff-filter=M --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
|
||||
RENAMED=$(git diff --diff-filter=R --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
|
||||
CHANGED=$(git diff --diff-filter=T --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
|
||||
TYPE_CHANGED=$(git diff --diff-filter=T --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
|
||||
UNMERGED=$(git diff --diff-filter=U --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
|
||||
UNKNOWN=$(git diff --diff-filter=X --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
|
||||
ALL_CHANGED=$(git diff --diff-filter="*ACDMRTUX" --name-only "$PREV_SHA" "$CURR_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
|
||||
|
@ -56,7 +56,7 @@ else
|
|||
DELETED_ARRAY=()
|
||||
MODIFIED_ARRAY=()
|
||||
RENAMED_ARRAY=()
|
||||
CHANGED_ARRAY=()
|
||||
TYPE_CHANGED_ARRAY=()
|
||||
UNMERGED_ARRAY=()
|
||||
UNKNOWN_ARRAY=()
|
||||
ALL_CHANGED_ARRAY=()
|
||||
|
@ -76,7 +76,7 @@ else
|
|||
# shellcheck disable=SC2207
|
||||
RENAMED_ARRAY+=($(git diff --diff-filter=R --name-only "$PREV_SHA" "$CURR_SHA" | grep -E "(${path})" | xargs || true))
|
||||
# shellcheck disable=SC2207
|
||||
CHANGED_ARRAY+=($(git diff --diff-filter=T --name-only "$PREV_SHA" "$CURR_SHA" | grep -E "(${path})" | xargs || true))
|
||||
TYPE_CHANGED_ARRAY+=($(git diff --diff-filter=T --name-only "$PREV_SHA" "$CURR_SHA" | grep -E "(${path})" | xargs || true))
|
||||
# shellcheck disable=SC2207
|
||||
UNMERGED_ARRAY+=($(git diff --diff-filter=U --name-only "$PREV_SHA" "$CURR_SHA" | grep -E "(${path})" | xargs || true))
|
||||
# shellcheck disable=SC2207
|
||||
|
@ -98,7 +98,7 @@ else
|
|||
# shellcheck disable=SC2001
|
||||
RENAMED=$(echo "${RENAMED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g')
|
||||
# shellcheck disable=SC2001
|
||||
CHANGED=$(echo "${CHANGED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g')
|
||||
TYPE_CHANGED=$(echo "${TYPE_CHANGED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g')
|
||||
# shellcheck disable=SC2001
|
||||
UNMERGED=$(echo "${UNMERGED_ARRAY[*]}" | sed 's/ */'"$INPUT_SEPARATOR"'/g')
|
||||
# shellcheck disable=SC2001
|
||||
|
@ -114,7 +114,7 @@ echo "Copied files: $COPIED"
|
|||
echo "Deleted files: $DELETED"
|
||||
echo "Modified files: $MODIFIED"
|
||||
echo "Renamed files: $RENAMED"
|
||||
echo "Changed files: $CHANGED"
|
||||
echo "Type Changed files: $TYPE_CHANGED"
|
||||
echo "Unmerged files: $UNMERGED"
|
||||
echo "Unknown files: $UNKNOWN"
|
||||
echo "All changed files: $ALL_CHANGED"
|
||||
|
@ -138,7 +138,7 @@ echo "::set-output name=copied_files::$COPIED"
|
|||
echo "::set-output name=deleted_files::$DELETED"
|
||||
echo "::set-output name=modified_files::$MODIFIED"
|
||||
echo "::set-output name=renamed_files::$RENAMED"
|
||||
echo "::set-output name=changed_files::$CHANGED"
|
||||
echo "::set-output name=type_changed_files::$TYPE_CHANGED"
|
||||
echo "::set-output name=unmerged_files::$UNMERGED"
|
||||
echo "::set-output name=unknown_files::$UNKNOWN"
|
||||
echo "::set-output name=all_changed_files::$ALL_CHANGED"
|
||||
|
|
Loading…
Reference in a new issue