poetry-dynamic-versioning
poetry-dynamic-versioning copied to clipboard
Recommended way of generating docs with dynamic versioning?
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).