mirror of
https://github.com/tj-actions/changed-files
synced 2025-02-22 21:17:39 +00:00
Update action.yml
This commit is contained in:
parent
7841015a94
commit
fdc23e7274
1 changed files with 20 additions and 20 deletions
40
action.yml
40
action.yml
|
@ -101,28 +101,28 @@ runs:
|
||||||
for path in ${INPUT_FILES}
|
for path in ${INPUT_FILES}
|
||||||
do
|
do
|
||||||
echo "Checking for file changes: \"${path}\"..."
|
echo "Checking for file changes: \"${path}\"..."
|
||||||
ADDED+=$(git diff --diff-filter=A --name-only "$HEAD_SHA" | grep -E "(${path})" || true)
|
ADDED+=$(git diff --diff-filter=A --name-only "$HEAD_SHA" | grep -E "(${path})" | xargs printf "%s${{ inputs.separator }}" || true)
|
||||||
COPIED+=$(git diff --diff-filter=C --name-only "$HEAD_SHA" | grep -E "(${path})" || true)
|
COPIED+=$(git diff --diff-filter=C --name-only "$HEAD_SHA" | grep -E "(${path})" | xargs printf "%s${{ inputs.separator }}" || true)
|
||||||
DELETED+=$(git diff --diff-filter=D --name-only "$HEAD_SHA" | grep -E "(${path})" || true)
|
DELETED+=$(git diff --diff-filter=D --name-only "$HEAD_SHA" | grep -E "(${path})" | xargs printf "%s${{ inputs.separator }}" || true)
|
||||||
MODIFIED+=$(git diff --diff-filter=M --name-only "$HEAD_SHA" | grep -E "(${path})" || true)
|
MODIFIED+=$(git diff --diff-filter=M --name-only "$HEAD_SHA" | grep -E "(${path})" | xargs printf "%s${{ inputs.separator }}" || true)
|
||||||
RENAMED+=$(git diff --diff-filter=R --name-only "$HEAD_SHA" | grep -E "(${path})" || true)
|
RENAMED+=$(git diff --diff-filter=R --name-only "$HEAD_SHA" | grep -E "(${path})" | xargs printf "%s${{ inputs.separator }}" || true)
|
||||||
CHANGED+=$(git diff --diff-filter=T --name-only "$HEAD_SHA" | grep -E "(${path})" || true)
|
CHANGED+=$(git diff --diff-filter=T --name-only "$HEAD_SHA" | grep -E "(${path})" | xargs printf "%s${{ inputs.separator }}" || true)
|
||||||
UNMERGED+=$(git diff --diff-filter=U --name-only "$HEAD_SHA" | grep -E "(${path})" || true)
|
UNMERGED+=$(git diff --diff-filter=U --name-only "$HEAD_SHA" | grep -E "(${path})" | xargs printf "%s${{ inputs.separator }}" || true)
|
||||||
UNKNOWN+=$(git diff --diff-filter=X --name-only "$HEAD_SHA" | grep -E "(${path})" || true)
|
UNKNOWN+=$(git diff --diff-filter=X --name-only "$HEAD_SHA" | grep -E "(${path})" | xargs printf "%s${{ inputs.separator }}" || true)
|
||||||
ALL_CHANGED+=$(git diff --diff-filter='*ACDMRTUX' --name-only "$HEAD_SHA" | grep -E "(${path})" || true)
|
ALL_CHANGED+=$(git diff --diff-filter='*ACDMRTUX' --name-only "$HEAD_SHA" | grep -E "(${path})" | xargs printf "%s${{ inputs.separator }}" || true)
|
||||||
ALL_MODIFIED_FILES+=$(git diff --diff-filter='ACM' --name-only "$HEAD_SHA" | grep -E "(${path})" || true)
|
ALL_MODIFIED_FILES+=$(git diff --diff-filter='ACM' --name-only "$HEAD_SHA" | grep -E "(${path})" | xargs printf "%s${{ inputs.separator }}" || true)
|
||||||
done
|
done
|
||||||
|
|
||||||
ADDED=$(IFS="${{ inputs.separator }}"; echo "${ADDED[*]}")
|
ADDED=$(echo "$ADDED" | sed -E 's/(${{ inputs.separator }})$//')
|
||||||
COPIED=$(IFS="${{ inputs.separator }}"; echo "${COPIED[*]}")
|
COPIED=$(echo $COPIED | sed -E 's/(${{ inputs.separator }})$//')
|
||||||
DELETED=$(IFS="${{ inputs.separator }}"; echo "${DELETED[*]}")
|
DELETED=$(echo "$DELETED" | sed -E 's/(${{ inputs.separator }})$//')
|
||||||
MODIFIED=$(IFS="${{ inputs.separator }}"; echo "${MODIFIED[*]}")
|
MODIFIED=$(echo "$MODIFIED" | sed -E 's/(${{ inputs.separator }})$//')
|
||||||
RENAMED=$(IFS="${{ inputs.separator }}"; echo "${RENAMED[*]}")
|
RENAMED=$(echo "$RENAMED" | sed -E 's/(${{ inputs.separator }})$//')
|
||||||
CHANGED=$(IFS="${{ inputs.separator }}"; echo "${CHANGED[*]}")
|
CHANGED=$(echo "$CHANGED" | sed -E 's/(${{ inputs.separator }})$//')
|
||||||
UNMERGED=$(IFS="${{ inputs.separator }}"; echo "${UNMERGED[*]}")
|
UNMERGED=$(echo "$UNMERGED" | sed -E 's/(${{ inputs.separator }})$//')
|
||||||
UNKNOWN=$(IFS="${{ inputs.separator }}"; echo "${UNKNOWN[*]}")
|
UNKNOWN=$(echo "$UNKNOWN" | sed -E 's/(${{ inputs.separator }})$//')
|
||||||
ALL_CHANGED=$(IFS="${{ inputs.separator }}"; echo "${ALL_CHANGED[*]}")
|
ALL_CHANGED=$(echo "$ALL_CHANGED" | sed -E 's/(${{ inputs.separator }})$//')
|
||||||
ALL_MODIFIED_FILES=$(IFS="${{ inputs.separator }}"; echo "${ALL_MODIFIED_FILES[*]}")
|
ALL_MODIFIED_FILES=$(echo "$ALL_MODIFIED_FILES" | sed -E 's/(${{ inputs.separator }})$//')
|
||||||
|
|
||||||
echo "::set-output name=added_files::$ADDED"
|
echo "::set-output name=added_files::$ADDED"
|
||||||
echo "::set-output name=copied_files::$COPIED"
|
echo "::set-output name=copied_files::$COPIED"
|
||||||
|
|
Loading…
Add table
Reference in a new issue