Limit to last commit
Previous solution found wrong file
This commit is contained in:
1 parent
10cc73e3ab
commit
6b51bb2d65
1 file changed
+1
-1
@@ -60,7 +60,7 @@ jobs:
|
||||
# Find out which files in data/ have been changed in the last commit
|
||||
#set -x # Debug #379
|
||||
# FILES=$(git log -1 -p data/ | grep +++ | cut -d '/' -f 2-| sed -e 's|dev/null||g')
|
||||
FILES=$(git log -10 --name-status --diff-filter=AR --pretty=format: -- data/ | awk '/^A/ || /^R/ {file=$2} END {print file}') # Most recent addition or renaming within the last 10 commits
|
||||
FILES=$(git log -1 --name-status --diff-filter=AR --pretty=format: -- data/ | awk '/^A/ || /^R/ {file=$2} END {print file}') # Most recent addition or renaming within the last commit
|
||||
echo "Last changed files from the FILES variable:"
|
||||
echo "$FILES" ; if [ -z "$FILES" ] ; then echo "Variable FILES is empty." && exit 1 ; fi
|
||||
# Work on these files that have been changed in the last commit
|
||||
|
||||
Reference in new issue
Block a user