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
15 changes: 14 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import datetime
import re

# Configuration file for the Sphinx documentation builder.
#
Expand All @@ -11,7 +12,19 @@
current_year = datetime.datetime.now().year
copyright = f"2022-{current_year}, OpenAtmos"
author = 'OpenAtmos'
version = 'v0.3.0'

# Read version from CMakeLists.txt
regex = r'project\(\w+\s+VERSION\s+([\d\.]+)'
version = '0.0.0'
# read the version from the cmake files
with open('../../CMakeLists.txt', 'r') as f:
for line in f:
match = re.match(regex, line)
if match:
version = match.group(1)
break

version = f'v{version}'
release = version

# -- General configuration ---------------------------------------------------
Expand Down
Loading