File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,11 @@ touch /tmp/swissknife/modified_files.txt
99
1010FILES_MODIFIED=" "
1111get_modified_files () {
12- FILES_MODIFIED=" "
13- FILES_MODIFIED=$( git diff --name-only $( git merge-base HEAD origin/${BASE_BRANCH} ) ..HEAD)
12+ if [[ " $CIRCLE_BRANCH " == " $BASE_BRANCH " ]]; then
13+ FILES_MODIFIED=$( git diff --name-only HEAD HEAD~1)
14+ else
15+ FILES_MODIFIED=$( git diff --name-only $( git merge-base HEAD origin/${BASE_BRANCH} ) ..HEAD)
16+ fi
1417}
1518
1619get_modified_files
Original file line number Diff line number Diff line change 11description : |
2- Finds all modified files for a given commit and base-branch
2+ Finds all modified files for a given commit and base-branch.
3+ This will only work on master branches if your team uses only squash merges.
34
45parameters :
56 base-branch :
You can’t perform that action at this time.
0 commit comments