Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch build failures in Makefile #612

Merged
merged 8 commits into from
Oct 29, 2024
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@ CONVERTFLAGS = --make-index --preprocessors=nbconvert.preprocessors.ExtractOutpu
init:
python -m pip install -U -r requirements-dev.txt

# nbcollection 'convert' also runs 'execute', so just calling 'convert' here
build: convert
buildall: convertall

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

convert:
set -e; \
i=0; \
_paths=($(MODIFIED_RQT_PATHS)); \
for notebook in ${MODIFIED_NOTEBOOKS}; do \
Expand All @@ -42,6 +48,7 @@ convert:
done

executeall:
set -e; \
i=0; \
_paths=(${ALL_RQT_PATHS}); \
for notebook in ${ALL_NOTEBOOKS}; do \
Expand All @@ -52,6 +59,7 @@ executeall:
done

convertall:
set -e; \
i=0; \
_paths=($(ALL_RQT_PATHS)); \
for notebook in ${ALL_NOTEBOOKS}; do \
Expand Down
Loading