Skip to content

Commit ddeec2f

Browse files
SebastianZugclaude
andcommitted
Fix automatic PDF tracking in git-update targets
- git-update-if-needed now checks for new PDFs in assets/pdf/ even when no build occurred - git-update now uses correct path assets/pdf/*.pdf instead of assets/*/pdf/*.pdf Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 4b60bec commit ddeec2f

16 files changed

+15
-6
lines changed

β€ŽMakefileβ€Ž

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,26 @@ git-update-if-needed:
9090
fi; \
9191
rm -f .cache/build_occurred; \
9292
else \
93-
echo "βœ… No courses rebuilt - git repository unchanged"; \
93+
echo "βœ… No courses rebuilt - checking for new PDFs..."; \
94+
NEW_PDFS=$$(git ls-files --others --exclude-standard assets/pdf/*.pdf 2>/dev/null); \
95+
if [ -n "$$NEW_PDFS" ]; then \
96+
echo "πŸ“Ž Found new PDFs: $$NEW_PDFS"; \
97+
git add assets/pdf/*.pdf; \
98+
git commit -m "Add new PDF files"; \
99+
git push origin main; \
100+
else \
101+
echo "βœ… No new PDFs found"; \
102+
fi; \
94103
fi
95104

96105
git-update:
97106
@echo "πŸ” Checking for changes..."
98107
@echo "πŸ“ Adding modified tracked files..."
99108
git add -u
100109
@echo "πŸ” Looking for new PDFs..."
101-
@if [ -n "$$(find assets/*/pdf -name "*.pdf" -type f 2>/dev/null)" ]; then \
102-
echo "πŸ“Ž Adding new PDF files..."; \
103-
git add -f assets/*/pdf/*.pdf; \
110+
@if [ -n "$$(git ls-files --others --exclude-standard assets/pdf/*.pdf 2>/dev/null)" ]; then \
111+
echo "πŸ“Ž Adding new PDF files from assets/pdf/..."; \
112+
git add assets/pdf/*.pdf; \
104113
fi
105114
@echo "πŸ“„ Adding HTML files..."
106115
git add *.html

β€Žassets/pdf/02618764b.pdfβ€Ž

-1.61 KB
Binary file not shown.

β€Žassets/pdf/039c7c00e.pdfβ€Ž

-1.85 KB
Binary file not shown.

β€Žassets/pdf/0415ad7f2.pdfβ€Ž

-50 Bytes
Binary file not shown.

β€Žassets/pdf/05088b4ea.pdfβ€Ž

6.13 KB
Binary file not shown.

β€Žassets/pdf/072f209ad.pdfβ€Ž

-6.49 KB
Binary file not shown.

β€Žassets/pdf/0af54563.pdfβ€Ž

507 Bytes
Binary file not shown.

β€Žassets/pdf/145e9ed.pdfβ€Ž

24 KB
Binary file not shown.

β€Žassets/pdf/1553f624.pdfβ€Ž

-657 Bytes
Binary file not shown.

β€Žassets/pdf/1efe210f.pdfβ€Ž

5.34 KB
Binary file not shown.

0 commit comments

Comments
Β (0)