drdoctr / doctr

A tool for automatically deploying docs from Travis CI to GitHub pages.
https://drdoctr.github.io
MIT License
107 stars 30 forks source link

Double check if files still exist before git-add #355

Open goerz opened 4 years ago

goerz commented 4 years ago

I figured out the problem I was having in #353 with deleting files from the deploy directory via a custom --command: The command runs after syncing, but before committing. Thus, if the command removes any files that were "added" by the syncing, then the "git add" during the commit will fail.

To get around this, we can just double check if "added" files are still there before calling "git add", respectively "removed" files are still deleted. If there are any changes to the status after the sync, a warning seems appropriate.

goerz commented 4 years ago

The CI failures do not seem to be related to my patch, cf. the docs-only PR #356 also failing. Let me know if there's anything I should do.

asmeurer commented 4 years ago

Yeah, there are some fixes I need to do for the tests. I haven't had the time to work on doctr in awhile unfortunately.