Resolved issue with version / release on Read the Docs

Read the Docs is building documentation referencing to specific releases
on GitHub.
Changing version / release  in this script is breaking menu in bottom
left corner
Now version / release should change only for local builds and not for
builds on Read the Docs
pull/77/head
Krzysztof 2016-11-05 17:11:40 +01:00
rodzic 9c2ab4559d
commit adca98348e
1 zmienionych plików z 17 dodań i 7 usunięć

Wyświetl plik

@ -75,13 +75,23 @@ copyright = u'2016, Espressif'
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# This is supposed to be "the short X.Y version", but it's the only version
# visible when you open index.html.
# Display full version to make things less confusing.
# If needed, nearest tag is returned by 'git describe --abbrev=0'.
version = run_cmd_get_output('git describe')
# The full version, including alpha/beta/rc tags.
release = run_cmd_get_output('git describe')
# Different setup depending if script is running on ReadTheDocs or elsewhere
on_rtd = os.environ.get('READTHEDOCS') == 'True'
if on_rtd:
# The short X.Y version.
# Apparently ReadTheDocs is getting confused by other version / release
# ReadTheDocs is building specific or the latest release from GitHub.
version = '1.0'
release = '1.0'
else:
# This is supposed to be "the short X.Y version", but it's the only version
# visible when you open index.html.
# Display full version to make things less confusing.
# If needed, nearest tag is returned by 'git describe --abbrev=0'.
version = run_cmd_get_output('git describe')
# The full version, including alpha/beta/rc tags.
release = run_cmd_get_output('git describe')
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.