Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ def get_version(version_file='VERSION'):
with open(version_file, 'r') as f:
for line in f:
if re.search('VERSION_MAJOR', line):
version['major'] = line.split()[1][:-1]
version['major'] = line.split()[1]
if re.search('VERSION_MINOR', line):
version['minor'] = line.split()[1][:-1]
version['minor'] = line.split()[1]
if re.search('VERSION_PATCH', line):
version['patch'] = line.split()[1][:-1]
version['patch'] = line.split()[1]
if 'major' in version and 'minor' in version and 'patch' in version:
break
except EnvironmentError:
Expand Down Expand Up @@ -350,11 +350,10 @@ def select_css(html_css_dir):
# The short X.Y version.
versions = get_version('{}/VERSION'.format(script_path))
if versions is None:
versions = get_version(os.path.abspath('{}/../VERSION'.format(script_path)))
versions = get_version('{}/../VERSION'.format(script_path))
if versions is None:
versions = get_version_from_cmakelists(
os.path.abspath('{}/CMakeLists.txt'.format(script_path))
)
'{}/CMakeLists.txt'.format(script_path))

version = '{}.{}'.format(versions['major'], versions['minor'])
# The full version, including alpha/beta/rc tags.
Expand Down
Loading