File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 3535 cat _changed_folders
3636
3737 # Do not prune if changing tests themselves
38- _INFRA_FOLDERS="build/ test/ .github/" # TODO: fix build/, remove github?
38+ _INFRA_FOLDERS="build/ test/"
3939 for d in _changed_folders; do
4040 if [[ "${_INFRA_FOLDERS}" =~ "$d" ]]; then
4141 echo "Infrastructure folders have changed; no tests will be pruned."
4646 # Remove leaf folders without changes
4747 # TODO: Handle intermeidate folders that also contain .tf
4848 for d in `find . -type d -name 'test' -prune -o -links 2 -printf '%P\n'`; do
49- if ! grep -q "^$d" _changed_folders; then
49+ if ! grep -q "^$d" _changed_folders && [ -n "$(find . -maxdepth 1 -name '*.tf' -type f -print -quit) $d" ] ; then
5050 rm -rf $d;
5151 fi
5252 done
You can’t perform that action at this time.
0 commit comments