conf.py: Get version from RTD when available

This commit is contained in:
Rémi Verschelde
2020-03-31 10:01:32 +02:00
parent 7ef16dd974
commit 605222c094
+2 -2
View File
@@ -37,9 +37,9 @@ author = "Juan Linietsky, Ariel Manzur and the Godot community"
# Version info for the project, acts as replacement for |version| and |release|
# The short X.Y version
version = "latest"
version = os.getenv("READTHEDOCS_VERSION", "latest")
# The full version, including alpha/beta/rc tags
release = "latest"
release = version
# Parse Sphinx tags passed from RTD via environment
env_tags = os.getenv("SPHINX_TAGS")