Skip to content

Commit

Permalink
Ensure that matrix generation for modules ignore function paths moved…
Browse files Browse the repository at this point in the history
… to spring functions catalog (#585)

Added checks for presence of folders when generating module matrix.
  • Loading branch information
Corneil du Plessis authored Nov 26, 2024
1 parent cbb4152 commit 2a5050b
Showing 1 changed file with 30 additions and 26 deletions.
56 changes: 30 additions & 26 deletions create-matrices.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,38 @@ popd > /dev/null
pushd applications/source > /dev/null
SOURCES=$(find * -maxdepth 0 -type d)
popd > /dev/null
pushd functions/consumer > /dev/null
CONSUMERS=$(find * -maxdepth 0 -type d)
popd > /dev/null
pushd functions/function > /dev/null
FUNCTIONS=$(find * -maxdepth 0 -type d)
popd > /dev/null
pushd functions/supplier > /dev/null
SUPPLIERS=$(find * -maxdepth 0 -type d)
popd > /dev/null

if [ -d functions ]; then
pushd functions/consumer > /dev/null
CONSUMERS=$(find * -maxdepth 0 -type d)
popd > /dev/null
pushd functions/function > /dev/null
FUNCTIONS=$(find * -maxdepth 0 -type d)
popd > /dev/null
pushd functions/supplier > /dev/null
SUPPLIERS=$(find * -maxdepth 0 -type d)
popd > /dev/null
fi
TOTAL=0
echo "{" > matrix.json
echo "\"functions\":[" >> matrix.json
COUNT=0
for app in $FUNCTIONS; do
add_app $app
done
echo "],\"consumers\":[" >> matrix.json
COUNT=0
for app in $CONSUMERS; do
add_app $app
done
echo "],\"suppliers\":[" >> matrix.json
COUNT=0
for app in $SUPPLIERS; do
add_app $app
done
echo "],\"processors\":[" >> matrix.json
if [ -d functions ]; then
echo "\"functions\":[" >> matrix.json
COUNT=0
for app in $FUNCTIONS; do
add_app $app
done
echo "],\"consumers\":[" >> matrix.json
COUNT=0
for app in $CONSUMERS; do
add_app $app
done
echo "],\"suppliers\":[" >> matrix.json
COUNT=0
for app in $SUPPLIERS; do
add_app $app
done
echo "],"
fi
echo "\"processors\":[" >> matrix.json
COUNT=0
for app in $PROCESSORS; do
add_app $app
Expand Down

0 comments on commit 2a5050b

Please sign in to comment.