Skip to content

Commit e7d20e1

Browse files
authored
Merge pull request #612 from jeffjennings/build_cleanup
Catch build failures in Makefile
2 parents a3144cc + 3880fc0 commit e7d20e1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,15 @@ CONVERTFLAGS = --make-index --preprocessors=nbconvert.preprocessors.ExtractOutpu
1818
init:
1919
python -m pip install -U -r requirements-dev.txt
2020

21+
# nbcollection 'convert' also runs 'execute', so just calling 'convert' here
2122
build: convert
2223
buildall: convertall
2324

25+
# 'set -e' is used to cause the bash loop to immediately exit on a failure.
26+
# without this, the github actions workflow can succeed even if commands in these
27+
# bash loops (installing packages, executing notebooks, converting notebooks) fail
2428
execute:
29+
set -e; \
2530
i=0; \
2631
_paths=($(MODIFIED_RQT_PATHS)); \
2732
for notebook in ${MODIFIED_NOTEBOOKS}; do \
@@ -32,6 +37,7 @@ execute:
3237
done
3338

3439
convert:
40+
set -e; \
3541
i=0; \
3642
_paths=($(MODIFIED_RQT_PATHS)); \
3743
for notebook in ${MODIFIED_NOTEBOOKS}; do \
@@ -42,6 +48,7 @@ convert:
4248
done
4349

4450
executeall:
51+
set -e; \
4552
i=0; \
4653
_paths=(${ALL_RQT_PATHS}); \
4754
for notebook in ${ALL_NOTEBOOKS}; do \
@@ -52,6 +59,7 @@ executeall:
5259
done
5360

5461
convertall:
62+
set -e; \
5563
i=0; \
5664
_paths=($(ALL_RQT_PATHS)); \
5765
for notebook in ${ALL_NOTEBOOKS}; do \

0 commit comments

Comments
 (0)