-
-
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: use environment variable
$READTHEDOCS_OUTPUT
to define outpu…
…t directory (#9913) * Build: use environment variable to define output directory `READTHEDOCS_OUTPUT` points to the path where the user's repository was clonned plus `_readthedocs/` subdirectory. This way we can make the command nicer: ``` python -m sphinx -T -E -j auto -b singlehtml -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/html ``` Also, we gives our users a clear contract to where to find those files, even if we change the path of the underlying variable in the future. * Log environment during build commands * Love the environment in the container build as well * Build: do not escape `$READTHEDOCS_OUTPUT` variable Add a simple hack to avoid escaping this internal variable since we need it to determine the output path. * Build: use `$READTHEDOCS_OUTPUT` variable for MkDocs builder * Log: do not log the environment It could contain some private data. * Build: organize absolute output directory for host and container There are some commands that are executed from inside the container where `$READTHEDOCS_OUTPUT` variable is defined and we can use it. However, there are other commands executed from the host where that variable is not defined and/or it cannot be used (e.g. as a `cwd=` argument for Docker run command). * Test: update tests to use the new variable * Build: rename variables to make it more clear Use `absolute_container_output_dir` and `absolute_host_output_dir` to differentiate them in a clear way. * Lint --------- Co-authored-by: Eric Holscher <[email protected]>
- Loading branch information
1 parent
09bdbb8
commit 2cde412
Showing
5 changed files
with
109 additions
and
64 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
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
Oops, something went wrong.