Strauman / travis-latexbuild

Building LaTeX packages using Travis-CI
12 stars 4 forks source link

Only clean up temporary files of the file that is to be build #18

Closed PHPirates closed 5 years ago

PHPirates commented 5 years ago

When you clean all temporary files before building, it seems you are also removing other pdf files - hence only the pdf of the last compiled file remains to be pushed to releases.

I tested the current docker image, and both files are compiled but only one pdf is uploaded: see build https://travis-ci.org/PHPirates/travis-ci-latex-pdf/builds/441280554 with result https://github.com/PHPirates/travis-ci-latex-pdf/releases/tag/test-v23

I also confirmed the bug locally (two tex files in same directory, only pdf of last compiled one is left) and the fix works for me.

PS I see you changed your main branch, but are you uploading the docker image to the hub from the code at master?

Strauman commented 5 years ago

Good catch. However, shouldn't this approach also create this problem? Also, why is cleaning really needed anyways?

Strauman commented 5 years ago

PS I see you changed your main branch, but are you uploading the docker image to the hub from the code at master?

Yes. The reason for the switch is just to direct the end-user directly to the quick start.

PHPirates commented 5 years ago

However, shouldn't this approach also create this problem?

No, because now you only clean the intermediate files (includes pdf) of the file you are going to create a pdf of, leaving all the other intermediate files in their place.

I don't need the cleaning there, but, the cleaning might possibly be necessary in case someone pushes their intermediate files, and when a compile fails but pdfs are still deployed then this setup ensures no old pdfs are deployed: instead, only the succeeded pdfs remain and those are deployed. I know, edge case, but it doesn't hurt to have it there - at least I can't think of anything right now :)