Skip to content

Commit 4409844

Browse files
committed
Merge branch 'master' into ci/tests_refactor
2 parents 07576fe + 620834a commit 4409844

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

.github/workflows/push.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ jobs:
123123
# If file ends with .ino, add it to the list of sketches
124124
echo "Sketch found: $file"
125125
sketches+="$file "
126-
continue
127126
elif [[ $(basename $(dirname $file)) == "src" ]]; then
128127
# If file is in a src directory, find all sketches in the parent/examples directory
129128
echo "Library src file found: $file"
@@ -135,31 +134,30 @@ jobs:
135134
# If file is in a example folder but it is not a sketch, find all sketches in the current directory
136135
echo "File in example folder found: $file"
137136
sketch=$(find $(dirname $file) -name *.ino)
138-
sketches+=$sketch
137+
sketches+="$sketch "
139138
echo "Sketch in example folder: $sketch"
140139
fi
141140
echo ""
142141
done
142+
else
143+
echo "Unhandled change triggered the build. This should not happen."
144+
exit 1
145+
fi
143146
147+
if [[ -n $sketches ]]; then
144148
# Remove duplicates
145149
sketches=$(echo $sketches | tr ' ' '\n' | sort | uniq)
146-
echo ""
147-
echo "Unique sketches: $sketches"
148-
149150
for sketch in $sketches; do
150151
echo $sketch >> sketches_found.txt
151152
chunks_count=$((chunks_count+1))
152153
done
153-
154154
echo "Number of sketches found: $chunks_count"
155-
else
156-
echo "Unhandled change triggered the build. This should not happen."
157-
exit 1
158-
fi
155+
echo "Sketches: $sketches"
159156
160-
if [[ $chunks_count -gt ${{ env.MAX_CHUNKS }} ]]; then
161-
echo "Too many sketches found. Limiting to ${{ env.MAX_CHUNKS }} chunks."
162-
chunks_count=${{ env.MAX_CHUNKS }}
157+
if [[ $chunks_count -gt ${{ env.MAX_CHUNKS }} ]]; then
158+
echo "More sketches than the allowed number of chunks found. Limiting to ${{ env.MAX_CHUNKS }} chunks."
159+
chunks_count=${{ env.MAX_CHUNKS }}
160+
fi
163161
fi
164162
165163
chunks='["0"'

0 commit comments

Comments
 (0)