File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 1313from os import environ
1414from pathlib import Path
1515
16+ from packaging .version import parse
17+
1618if sys .version_info >= (3 , 11 ):
1719 import tomllib as toml
1820else :
2931author = "Choi Min-yeong"
3032kr_timezone = timezone (timedelta (hours = 9 ))
3133copyright = f"2024-{ datetime .now (kr_timezone ).year } , Choi Min-yeong"
32- release = environ .get ("READTHEDOCS_GIT_IDENTIFIER" , dist .version )
34+
35+ parsed_version = parse (dist .version )
36+ version = parsed_version .base_version
37+ readthedocs = environ .get ("READTHEDOCS_VERSION" )
38+ if readthedocs and readthedocs in ["latest" , "stable" , "main" , "dev" ]:
39+ release = readthedocs
40+ else :
41+ release = parsed_version .public
42+
3343repo_url : str = pyproject_dict ["project" ]["urls" ]["Repository" ]
3444
3545# -- General configuration ---------------------------------------------------
You can’t perform that action at this time.
0 commit comments