|
|
@@ -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.
|