Attempt to detect whether a Sphinx build ran 100% without mutating a changelog, and bail out with a useful error. When this is not done, the only telltale sign is Sphinx-core complaining that it doesn't know what issue or release roles are (because they never got mutated into useful nodes.) This is kinda grody.
The only way I can think to do this offhand is to add A) some state keeping and B) a hook into the step after the one we currently hook into. I.e.:
Initialize some global variable (meh), e.g. did_a_changelog = False
Hook into the "build each document" step as we do now; set did_a_changelog = True if we do run.
In some step after that prior step, test did_a_changelog and die usefully if still False.
Attempt to detect whether a Sphinx build ran 100% without mutating a changelog, and bail out with a useful error. When this is not done, the only telltale sign is Sphinx-core complaining that it doesn't know what
issue
orrelease
roles are (because they never got mutated into useful nodes.) This is kinda grody.The only way I can think to do this offhand is to add A) some state keeping and B) a hook into the step after the one we currently hook into. I.e.:
did_a_changelog = False
did_a_changelog = True
if we do run.did_a_changelog
and die usefully if stillFalse
.