Skip to content

Commit

Permalink
Determine FILES= in another way
Browse files Browse the repository at this point in the history
Try to fix #3167
  • Loading branch information
probonopd committed Jun 18, 2023
1 parent 79b510d commit bd3935f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ jobs:
# until xset -q; do echo "Waiting for X server to start..."; sleep 1; done # We are not immediately using it anyway
# 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 -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
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
Expand Down

0 comments on commit bd3935f

Please sign in to comment.