diff --git a/doc/conf.py b/doc/conf.py index e046f33c..7041c9d0 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -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