Skip to content

Commit c9af88c

Browse files
authored
Fix documentation version (#504)
Signed-off-by: Raul Sanchez-Mateos <[email protected]>
1 parent 402eb2c commit c9af88c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

docs/conf.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ def get_version(version_file='VERSION'):
5050
with open(version_file, 'r') as f:
5151
for line in f:
5252
if re.search('VERSION_MAJOR', line):
53-
version['major'] = line.split()[1][:-1]
53+
version['major'] = line.split()[1]
5454
if re.search('VERSION_MINOR', line):
55-
version['minor'] = line.split()[1][:-1]
55+
version['minor'] = line.split()[1]
5656
if re.search('VERSION_PATCH', line):
57-
version['patch'] = line.split()[1][:-1]
57+
version['patch'] = line.split()[1]
5858
if 'major' in version and 'minor' in version and 'patch' in version:
5959
break
6060
except EnvironmentError:
@@ -350,11 +350,10 @@ def select_css(html_css_dir):
350350
# The short X.Y version.
351351
versions = get_version('{}/VERSION'.format(script_path))
352352
if versions is None:
353-
versions = get_version(os.path.abspath('{}/../VERSION'.format(script_path)))
353+
versions = get_version('{}/../VERSION'.format(script_path))
354354
if versions is None:
355355
versions = get_version_from_cmakelists(
356-
os.path.abspath('{}/CMakeLists.txt'.format(script_path))
357-
)
356+
'{}/CMakeLists.txt'.format(script_path))
358357

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

0 commit comments

Comments
 (0)