Browse Source

conf.py: Get version from RTD when available

(cherry picked from commit 605222c0943fce1de0f7fd3407ef6434496df1aa)
Rémi Verschelde 5 năm trước cách đây
mục cha
commit
8513fbcdea
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      conf.py

+ 2 - 2
conf.py

@@ -28,9 +28,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", "3.1")
 # 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')