File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 3
3
for dir in ./samples/* /; do
4
4
# set variable pulumi to true if there is a Pulumi.yaml file in the directory, or there is a directory called pulumi
5
5
pulumi=false
6
- if [[ -f " ${dir} Pulumi.yaml" ]] ; then
6
+ if find " ${dir} " -name ' Pulumi.yaml' -exec true {} + ; then
7
7
pulumi=true
8
8
elif [[ -d " ${dir} pulumi" ]]; then
9
9
pulumi=true
10
10
fi
11
11
12
12
if [[ ! -f " ${dir} compose.yaml" ]]; then
13
- if find " ${dir} " -name ' Pulumi.yaml' -exec false {} +; then
13
+ if [[ " $pulumi " == " false" ]]; then
14
+ # if not pulumi and no compose, tell user to add compose.yaml
14
15
echo " - [ ] add compose.yaml to ${dir} "
15
16
fi
17
+ else
18
+ # if there is a compose.yaml file, check if it is valid
19
+ (
20
+ cd $dir
21
+ if ! defang compose config > /dev/null 2> /dev/null; then
22
+ echo " - [ ] ${dir} compose.yaml contains errors"
23
+ fi
24
+ )
16
25
fi
17
26
18
27
# Check that we have a .github/workflows/deploy.yaml file
You can’t perform that action at this time.
0 commit comments