We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 84070ba commit 82bafc5Copy full SHA for 82bafc5
build/int.cloudbuild.yaml
@@ -42,9 +42,16 @@ steps:
42
fi
43
done < _changed_folders
44
45
+ # Remove base folders without changes
46
+ for d in *; do
47
+ if ! grep -q "^$d$" _changed_folders && [[ "$d" != "test" ]]; then
48
+ rm -rf $d;
49
+ fi
50
+ done
51
+
52
# Remove leaf folders without changes or non-tf resources
53
for d in `find . -type d -name 'test' -prune -o -links 2 -printf '%P\n'`; do
- if ! grep -q "^$d" _changed_folders && ! [ -n "$(find $d -maxdepth 1 -not -name '*.tf' -type f -print -quit)" ]; then
54
+ if ! grep -q "^$d" _changed_folders && ! [ -n "$(find $d -maxdepth 1 -not -name '*.tf' -and -not -name 'test.yaml' -type f -print -quit)" ]; then
55
rm -rf $d
56
57
done
0 commit comments