mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Dynamically extract sphinx documentation release version.
Dynamically extract sphinx documentation release version from dune.module version.
This commit is contained in:
parent
566a844fef
commit
34f93e2198
@ -3,7 +3,18 @@
|
|||||||
project = "opm.simulators"
|
project = "opm.simulators"
|
||||||
copyright = "2024 Equinor ASA"
|
copyright = "2024 Equinor ASA"
|
||||||
author = "Håkon Hægland"
|
author = "Håkon Hægland"
|
||||||
release = "0.1"
|
|
||||||
|
# Function to extract release version from dune.module file
|
||||||
|
def extract_opm_simulators_release():
|
||||||
|
version_file_path = '../../../dune.module'
|
||||||
|
with open(version_file_path, 'r') as file:
|
||||||
|
for line in file:
|
||||||
|
if line.startswith('Version:'):
|
||||||
|
version_string = line.split(':')[1].strip()
|
||||||
|
return version_string
|
||||||
|
return "unknown" # Fallback version
|
||||||
|
|
||||||
|
release = extract_opm_simulators_release()
|
||||||
|
|
||||||
# -- General configuration ---------------------------------------------------
|
# -- General configuration ---------------------------------------------------
|
||||||
import os
|
import os
|
||||||
|
Loading…
Reference in New Issue
Block a user