Compare commits

...

5 Commits

Author SHA1 Message Date
Tonye Jack
55a857d66a Update removing trailing separator (#182)
* Update removing trailing separator

* Update test new.txt
2021-09-03 03:38:10 -04:00
Tonye Jack
684c3a8487 Update README.md 2021-08-29 12:35:45 -04:00
Tonye Jack
9d6b2c32e8 Update README.md 2021-08-29 12:26:16 -04:00
Tonye Jack
e6c1b2487a Update README.md (#178) 2021-08-29 11:28:33 -04:00
Tonye Jack
506cc732d4 Upgraded from v1.0.1 -> v1.0.2 (#176)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2021-08-28 05:40:10 -04:00
4 changed files with 36 additions and 23 deletions

View File

@@ -1,5 +1,18 @@
# Changelog
## [v1.0.2](https://github.com/tj-actions/changed-files/tree/v1.0.2) (2021-08-28)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.0.1...v1.0.2)
**Fixed bugs:**
- \[BUG\] Error: xargs: unmatched single quote [\#169](https://github.com/tj-actions/changed-files/issues/169)
**Merged pull requests:**
- Fixed bug with parsing filenames that contain quotes [\#174](https://github.com/tj-actions/changed-files/pull/174) ([jackton1](https://github.com/jackton1))
- Upgraded to v1.0.1 [\#173](https://github.com/tj-actions/changed-files/pull/173) ([jackton1](https://github.com/jackton1))
## [v1.0.1](https://github.com/tj-actions/changed-files/tree/v1.0.1) (2021-08-28)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.0.0...v1.0.1)

View File

@@ -57,7 +57,7 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v1.0.1
uses: tj-actions/changed-files@v1.0.2
- name: List all modified files
run: |
@@ -83,9 +83,9 @@ jobs:
|:--------------------:|:------------:|:----------------------------------:|:----------------------------------------:|
| any_changed | `string` | `true` OR `false` | Returns `true` when any <br /> of the filenames provided using <br /> the `files` input has changed. <br /> i.e. *using a combination of all added, <br />copied, modified and renamed files (ACMR).* |
| only_changed | `string` | `true` OR `false` | Returns `true` when only <br /> files provided using <br /> the `files` input have changed. |
| other_changed_files | `string` | `'new.txt path/to/file.png ...'` | Select all modified files <br/> not listed in the files input <br /> i.e. *a combination of all added, <br /> copied and modified files (ACM).* |
| other_changed_files | `string` | `'new.txt path/to/file.png ...'` | Select all other changed files <br/> not listed in the files input <br /> i.e. *a combination of all added, <br /> copied and modified files (ACMR).* |
| all_modified_files | `string` | `'new.txt path/to/file.png ...'` | Select all modified files <br /> i.e. *a combination of all added, <br />copied, modified and renamed files (ACMR).* |
| all_changed_files | `string` | `'new.txt path/to/file.png ...'` | Select all paths (\*) <br /> i.e. *a combination of all options below.* |
| all_changed_files | `string` | `'new.txt path/to/file.png ...'` | Select all changed files (\*) <br /> i.e. *a combination of (ACMRDTUX).* |
| added_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Added (A) |
| copied_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Copied (C) |
| deleted_files | `string` | `'new.txt path/to/file.png ...'` | Select only files that are Deleted (D) |
@@ -116,11 +116,11 @@ jobs:
- name: Get changed files using defaults
id: changed-files
uses: tj-actions/changed-files@v1.0.1
uses: tj-actions/changed-files@v1.0.2
- name: Get changed files using a comma separator
id: changed-files-comma
uses: tj-actions/changed-files@v1.0.1
uses: tj-actions/changed-files@v1.0.2
with:
separator: ","
@@ -142,7 +142,7 @@ jobs:
- name: Get specific changed files
id: changed-files-specific
uses: tj-actions/changed-files@v1.0.1
uses: tj-actions/changed-files@v1.0.2
with:
files: |
my-file.txt
@@ -166,14 +166,14 @@ jobs:
- name: Use a source file or list of file(s) to populate to files input.
id: changed-files-specific-source-file
uses: tj-actions/changed-files@v1.0.1
uses: tj-actions/changed-files@v1.0.2
with:
files_from_source_file: |
test/changed-files-list.txt
- name: Use a source file or list of file(s) to populate to files input and optionally specify more files.
id: changed-files-specific-source-file-and-specify-files
uses: tj-actions/changed-files@v1.0.1
uses: tj-actions/changed-files@v1.0.2
with:
files_from_source_file: |
test/changed-files-list.txt
@@ -182,13 +182,13 @@ jobs:
- name: Use a different commit SHA
id: changed-files-custom-sha
uses: tj-actions/changed-files@v1.0.1
uses: tj-actions/changed-files@v1.0.2
with:
sha: ${{ github.event.pull_request.head.sha }}
- name: Use a different base SHA
id: changed-files-custom-base-sha
uses: tj-actions/changed-files@v1.0.1
uses: tj-actions/changed-files@v1.0.2
with:
base_sha: "2096ed0"
@@ -200,7 +200,7 @@ jobs:
- name: Run changed-files with defaults on the dir1
id: changed-files-for-subfolder
uses: tj-actions/changed-files@v1.0.1
uses: tj-actions/changed-files@v1.0.2
with:
path: subfolder
@@ -217,7 +217,7 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v1.0.1
uses: tj-actions/changed-files@v1.0.2
- name: Pre-commit
uses: pre-commit/action@v2.0.0

View File

@@ -66,16 +66,16 @@ UNIQUE_FILES=$(echo "$INPUT_FILES" | tr " " "\n" | sort -u | xargs -0)
if [[ -z "$UNIQUE_FILES" ]]; then
echo "Getting diff..."
ADDED=$(git diff --diff-filter=A --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
COPIED=$(git diff --diff-filter=C --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
DELETED=$(git diff --diff-filter=D --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
MODIFIED=$(git diff --diff-filter=M --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
RENAMED=$(git diff --diff-filter=R --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
TYPE_CHANGED=$(git diff --diff-filter=T --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
UNMERGED=$(git diff --diff-filter=U --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
UNKNOWN=$(git diff --diff-filter=X --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
ALL_CHANGED=$(git diff --diff-filter="*ACDMRTUX" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
ALL_MODIFIED_FILES=$(git diff --diff-filter="ACMR" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
ADDED=$(git diff --diff-filter=A --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed "s/.$//")
COPIED=$(git diff --diff-filter=C --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed "s/.$//")
DELETED=$(git diff --diff-filter=D --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed "s/.$//")
MODIFIED=$(git diff --diff-filter=M --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed "s/.$//")
RENAMED=$(git diff --diff-filter=R --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed "s/.$//")
TYPE_CHANGED=$(git diff --diff-filter=T --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed "s/.$//")
UNMERGED=$(git diff --diff-filter=U --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed "s/.$//")
UNKNOWN=$(git diff --diff-filter=X --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed "s/.$//")
ALL_CHANGED=$(git diff --diff-filter="*ACDMRTUX" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed "s/.$//")
ALL_MODIFIED_FILES=$(git diff --diff-filter="ACMR" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed "s/.$//")
else
ADDED_ARRAY=()
COPIED_ARRAY=()

View File

@@ -1 +1 @@
This is a test