diff --git a/docs/en/conf.py b/docs/en/conf.py index bde55cce..3c99b3c4 100644 --- a/docs/en/conf.py +++ b/docs/en/conf.py @@ -27,14 +27,16 @@ copyright = '2023, OpenCompass' author = 'OpenCompass Authors' # The full version, including alpha/beta/rc tags -# version_file = '../../opencompass/version.py' +version_file = '../../opencompass/__init__.py' -# def get_version(): -# with open(version_file, 'r') as f: -# exec(compile(f.read(), version_file, 'exec')) -# return locals()['__version__'] -release = '1.0.0' +def get_version(): + with open(version_file, 'r') as f: + exec(compile(f.read(), version_file, 'exec')) + return locals()['__version__'] + + +release = get_version() # -- General configuration --------------------------------------------------- diff --git a/docs/zh_cn/conf.py b/docs/zh_cn/conf.py index 3338097f..3c99b3c4 100644 --- a/docs/zh_cn/conf.py +++ b/docs/zh_cn/conf.py @@ -27,14 +27,16 @@ copyright = '2023, OpenCompass' author = 'OpenCompass Authors' # The full version, including alpha/beta/rc tags -# version_file = '../../opencompass/version.py' +version_file = '../../opencompass/__init__.py' -# def get_version(): -# with open(version_file, 'r') as f: -# exec(compile(f.read(), version_file, 'exec')) -# return locals()['__version__'] -release = '0.5.0' +def get_version(): + with open(version_file, 'r') as f: + exec(compile(f.read(), version_file, 'exec')) + return locals()['__version__'] + + +release = get_version() # -- General configuration --------------------------------------------------- diff --git a/opencompass/__init__.py b/opencompass/__init__.py index b794fd40..10939f01 100644 --- a/opencompass/__init__.py +++ b/opencompass/__init__.py @@ -1 +1 @@ -__version__ = '0.1.0' +__version__ = '0.1.2'