Skip to content

Commit 820b280

Browse files
AllenDowneyclaude
andcommitted
Build scripts: commit only when something is staged, so make build doesn't stop when nothing changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent f554368 commit 820b280

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎PROJECT_BOARD.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ Pushed after chap10 (2026-10-13): both repos, one push each; student notebooks a
192192

193193
**Released after chap27 (2026-10-13):** ModSimPySolutions and ModSimPy pushed (CI passed on both); student chapters and examples, the notebook zip and `modsim.py` regenerated; site rebuilt and published (chapter numbers, all fixes; Pages deploy checked live); short links `/minmod`, `/cdc`, `/minimize` deployed (GreenTeaPress `2f9dd77`). All 44 solution notebooks passed nbmake locally first.
194194

195-
**Build snag:** `make build` stops when a build script has nothing new to commit (the scripts run `git commit` unconditionally and exit with its status), e.g. when the exported `chapNN.py` are unchanged. This time the steps were run by hand in the Makefile's order. Fix: make those commits conditional (`git diff --cached --quiet || git commit ...`).
195+
**Build snag:** `make build` stops when a build script has nothing new to commit (the scripts run `git commit` unconditionally and exit with its status), e.g. when the exported `chapNN.py` are unchanged. This time the steps were run by hand in the Makefile's order. Fix: make those commits conditional (`git diff --cached --quiet || git commit ...`). **Fixed 2026-10-13** in `chapters/build.sh`, `examples/build.sh` and `ModSimPySolutions/chapters/build.sh`.
196196

197197
| Notebooks | Status |
198198
|---|---|

‎chapters/build.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ python remove_soln.py
44

55
# add and commit
66
git add chap*.ipynb chap*.py
7-
git commit -m "Updating chapters"
7+
git diff --cached --quiet || git commit -m "Updating chapters"
88

99
# build the zip file
1010
cd ../..; zip -r ModSimPyNotebooks.zip \
@@ -16,4 +16,4 @@ mv ModSimPyNotebooks.zip ModSimPy
1616
cd ModSimPy
1717

1818
git add ModSimPyNotebooks.zip
19-
git commit -m "Updating the notebook zip file"
19+
git diff --cached --quiet || git commit -m "Updating the notebook zip file"

‎examples/build.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ python remove_soln.py
44

55
# add and commit
66
git add *.ipynb
7-
git commit -m "Updating examples"
7+
git diff --cached --quiet || git commit -m "Updating examples"

0 commit comments

Comments
 (0)