-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build: rename PDF/ePUB filename to valid one automatically (#11198)
* Build: rename PDF/ePUB filename to valid one automatically Currently, we _require_ the user to save the PDF or ePUB file with a pretty specific filename: `{project.slug}-{version.slug}.{extension}`. This has caused a lot of confusions to users. Since we only support 1 file for PDF/ePUB for now, we can rename this file to the valid filename automatically. Closes #10873 * Rename the offline format file properly * Initial attempt to write a test case * Revert "Initial attempt to write a test case" This reverts commit 76ab170. * Test case and filename fix * Remove the conditional that's not needed * Assert the path is inside OUTPUT dir before calling `shutil.move` * Revert "Assert the path is inside OUTPUT dir before calling `shutil.move`" This reverts commit e9a0f08. * Assert the path is inside the DOCROOT before calling `shutil.move` * Update readthedocs/projects/tasks/builds.py Co-authored-by: Santos Gallegos <[email protected]> --------- Co-authored-by: Santos Gallegos <[email protected]>
- Loading branch information
Showing
3 changed files
with
60 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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