sphinx-contrib / sphinxcontrib-versioning

Sphinx extension that allows building versioned docs for self-hosting.
https://sphinxcontrib-versioning.readthedocs.io/en/latest/
MIT License
125 stars 81 forks source link

Build fails when using Sphinx tags #76

Open vancheese opened 4 years ago

vancheese commented 4 years ago

I am using sphinx tags to hide/show contents on different branches. This works using sphinx-build to build individual branches with all options However, if I add tag options to the at the start of the build_main argv (e.g., '-t{}'.format(current_name)' ) in build in sphinx.py I get an git.exc.InvalidGitRepositoryError

There is no error with the sphinx build_main input as I can manually build a version of the documentation from ipython with the same command sphinx-err-0e3hl05f.log

seiferma commented 4 years ago

I am experiencing a similar error. As far as I understand the code, it exports the files into a temporary directory and runs the build there. This process does not seem to copy the .git folder. Therefore, no git repository is available during the build of the branch.

To support extensions that require access to the underlying git repository, the export process would have to be changed from a simple snapshot to a full checkout. I do not know, how much effort this would require nor if I am correct in the first place.