File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,14 +49,21 @@ for ((i=0; i < ${#GITHUB_ACTIONS[@]}; i++)); do
4949 ASYNC_BUILDS[i]=$!
5050done
5151
52+ EXIT_CODE=0
5253for (( i= 0 ; i < ${# GITHUB_ACTIONS[@]} ; i++ )) ; do
5354 ACTION=${GITHUB_ACTIONS[$i]}
5455 ACTION_DIR=$( dirname " $ACTION " )
56+ ACTION_NAME=$( basename " $ACTION " .ts)
5557
5658 # Wait for the background build to finish
57- wait " ${ASYNC_BUILDS[$i]} "
58-
59- # Prepend the warning note to the top of the compiled file
60- OUTPUT_FILE=" $ACTION_DIR /index.js"
61- echo " $NOTE_DONT_EDIT $( cat " $OUTPUT_FILE " ) " > " $OUTPUT_FILE "
59+ if wait " ${ASYNC_BUILDS[$i]} " ; then
60+ # Prepend the warning note to the top of the compiled file
61+ OUTPUT_FILE=" $ACTION_DIR /index.js"
62+ echo " $NOTE_DONT_EDIT $( cat " $OUTPUT_FILE " ) " > " $OUTPUT_FILE "
63+ else
64+ echo " ❌ $ACTION_NAME failed to build: $ACTION_DIR /index.js" >&2
65+ EXIT_CODE=1
66+ fi
6267done
68+
69+ exit $EXIT_CODE
You can’t perform that action at this time.
0 commit comments