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 33for dir in ./samples/* /; do
44 # set variable pulumi to true if there is a Pulumi.yaml file in the directory, or there is a directory called pulumi
55 pulumi=false
6- if [[ -f " ${dir} Pulumi.yaml" ]] ; then
6+ if find " ${dir} " -name ' Pulumi.yaml' -exec true {} + ; then
77 pulumi=true
88 elif [[ -d " ${dir} pulumi" ]]; then
99 pulumi=true
1010 fi
1111
1212 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
1415 echo " - [ ] add compose.yaml to ${dir} "
1516 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+ )
1625 fi
1726
1827 # Check that we have a .github/workflows/deploy.yaml file
You can’t perform that action at this time.
0 commit comments