Repository navigation
Publish PDFs under their source-relative path - #20
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_fileswalkedCLOBBERand copied every PDF to_buildunderFile.basename.a/note.texxandb/note.texxoverwrote one file. A copy error was printed and then ignored.Deploy now copies
PDF_FILESto_build/<same-relative-path>.CLOBBERstill deletes the PDFs from the source tree after the copy.cpis allowed to raise, so a missing PDF fails the task before the success line.Verification
ruby test/deploy_test.rbpasses.my docs/note.texxis published at_build/my docs/note.pdf.a/note.texxandb/note.texxare both published. Alatexmkthat exits 0 without writing a PDF fails the deploy.DOCBLD_REAL_LATEX=1 ruby test/deploy_test.rb --name test_real_latexmk_compiles_a_documentcompiled a real article and published_build/hello.pdf.