read version from Cargo.toml
This commit is contained in:
parent
efc5055262
commit
2ca3189fe6
|
@ -4,3 +4,4 @@
|
|||
/*.sqlite3
|
||||
docs/*/build/
|
||||
dev_config.toml
|
||||
Pipfile*
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
sphinx
|
||||
tomlkit
|
|
@ -5,11 +5,15 @@
|
|||
|
||||
# -- Project information -----------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
||||
from pathlib import Path
|
||||
from tomlkit import parse
|
||||
|
||||
_cargo_toml = Path(__file__).resolve().parent.parent.parent / 'Cargo.toml'
|
||||
|
||||
project = 'Tiempo'
|
||||
copyright = '2022, Categulario'
|
||||
author = 'Categulario'
|
||||
release = '1.4.1'
|
||||
release = str(parse(open(_cargo_toml).read())['package']['version'])
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
||||
|
|
Loading…
Reference in New Issue