浏览代码

conf.py: Get version from RTD when available

Rémi Verschelde 5 年之前
父节点
当前提交
605222c094
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      conf.py

+ 2 - 2
conf.py

@@ -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")