소스 검색

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