rtd: Use provided version string on rtd
@APP_VERSION@ isn't available on rtd because it doesn't configure the entire project
This commit is contained in:
parent
28b8877edc
commit
7724c4dccb
15
doc/conf.py
15
doc/conf.py
@ -26,14 +26,19 @@ copyright = '2016-{}, Michael Carlberg & contributors'.format(
|
|||||||
)
|
)
|
||||||
author = 'Polybar Team'
|
author = 'Polybar Team'
|
||||||
|
|
||||||
# The short X.Y version
|
|
||||||
version = '@APP_VERSION@'
|
|
||||||
# The full version, including alpha/beta/rc tags
|
|
||||||
release = version
|
|
||||||
|
|
||||||
# is whether we are on readthedocs.io
|
# is whether we are on readthedocs.io
|
||||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||||
|
|
||||||
|
if on_rtd:
|
||||||
|
# On readthedocs, cmake isn't run so the version string isn't available
|
||||||
|
version = os.environ.get('READTHEDOCS_VERSION', None)
|
||||||
|
else:
|
||||||
|
# The short X.Y version
|
||||||
|
version = '@APP_VERSION@'
|
||||||
|
|
||||||
|
# The full version, including alpha/beta/rc tags
|
||||||
|
release = version
|
||||||
|
|
||||||
# Set path to documentation
|
# Set path to documentation
|
||||||
if on_rtd:
|
if on_rtd:
|
||||||
# On readthedocs conf.py is already in the doc folder
|
# On readthedocs conf.py is already in the doc folder
|
||||||
|
Loading…
Reference in New Issue
Block a user