Skip to content

Publish PDFs under their source-relative path - #20

Merged
Traap merged 1 commit into
masterfrom
issue/16-publish-pdfs-under-source-path
Dec 1, 2026
Merged

Traap merged 1 commit into
masterfrom
issue/16-publish-pdfs-under-source-path

Conversation

@Traap

@Traap Traap commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Closes #16

Principle: Model the Domain - a published PDF keeps the path of its source, and the clobber list stays the list of files to delete.

copy_files walked CLOBBER and copied every PDF to _build under File.basename. a/note.texx and b/note.texx overwrote one file. A copy error was printed and then ignored.

Deploy now copies PDF_FILES to _build/<same-relative-path>. CLOBBER still deletes the PDFs from the source tree after the copy. cp is allowed to raise, so a missing PDF fails the task before the success line.

Verification

ruby test/deploy_test.rb passes. my docs/note.texx is published at _build/my docs/note.pdf. a/note.texx and b/note.texx are both published. A latexmk that exits 0 without writing a PDF fails the deploy.

DOCBLD_REAL_LATEX=1 ruby test/deploy_test.rb --name test_real_latexmk_compiles_a_document compiled a real article and published _build/hello.pdf.

Copy the PDF list, not the clobber list, and keep each file's
directory. Two sources that share a filename both survive, and a
missing PDF fails the deploy.
@Traap
Traap merged commit 468d494 into master Dec 1, 2026
1 check passed
@Traap
Traap deleted the issue/16-publish-pdfs-under-source-path branch December 1, 2026 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish PDFs under their source-relative path

1 participant