File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -193,6 +193,18 @@ jobs:
193193 board_name=${board_name%_noota}
194194 # Remove 'wippersnapper_' prefix if present
195195 board_name=${board_name#wippersnapper_}
196+ # check folder name exists, otherwise do replace of underscore with dash, or blank
197+ if [ ! -d "ws-boards/boards/${board_name}" ]; then
198+ if [ -d "ws-boards/boards/${board_name//_/-}" ]; then
199+ board_name=${board_name//_/-}
200+ elif [ -d "ws-boards/boards/${board_name//_//}" ]; then
201+ board_name=${board_name//_//}
202+ else
203+ echo "Error: Board definition folder ws-boards/boards/${board_name} does not exist."
204+ exit 1
205+ fi
206+ fi
207+ # check again if folder exists, otherwise replace underscore with blank
196208 content=$(cat ws-boards/boards/${board_name//_/-}/definition.json)
197209 {
198210 echo 'boardJson<<EOF'
You can’t perform that action at this time.
0 commit comments