poetry-dynamic-versioning icon indicating copy to clipboard operation
poetry-dynamic-versioning copied to clipboard

Recommended way of generating docs with dynamic versioning?

Open cmarqu opened this issue 1 year ago • 6 comments

I am using sphinx-build to generate my documentation, and its conf.py contains a __version__ variable and is set up to be substituted by poetry-dynamic-versioning. Unfortunately, poetry run is one of the few commands where dynamic versioning is not applied, so I cannot just call poetry run sphinx-build <args>. Is there a recommended way of running such commands? I can only think of doing something like git stash save && poetry dynamic-versioning && sphinx-build <args> && git restore . && git stash pop right now (which I noticed does not work correctly when there is nothing to stash; it pops some old stashed code then).

cmarqu avatar Mar 28 '23 17:03 cmarqu