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:
patrick96 2019-05-17 09:35:48 +02:00 committed by Patrick Ziegler
parent 28b8877edc
commit 7724c4dccb

View File

@ -26,14 +26,19 @@ copyright = '2016-{}, Michael Carlberg & contributors'.format(
)
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
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
if on_rtd:
# On readthedocs conf.py is already in the doc folder