mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
docs ~ use version calculated from *Cargo.toml*
This commit is contained in:
parent
77a04546f0
commit
df57df8c93
1 changed files with 7 additions and 6 deletions
13
docs/conf.py
13
docs/conf.py
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
import glob
|
import glob
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
|
|
||||||
# -- General configuration ------------------------------------------------
|
# -- General configuration ------------------------------------------------
|
||||||
|
|
||||||
|
@ -55,11 +56,14 @@ author = 'uutils developers'
|
||||||
# The version info for the project you're documenting, acts as replacement for
|
# The version info for the project you're documenting, acts as replacement for
|
||||||
# |version| and |release|, also used in various other places throughout the
|
# |version| and |release|, also used in various other places throughout the
|
||||||
# built documents.
|
# built documents.
|
||||||
#
|
# * take version from project "Cargo.toml"
|
||||||
|
version_file = open(os.path.join("..","Cargo.toml"), "r")
|
||||||
|
version_file_content = version_file.read()
|
||||||
|
v = re.search("^\s*version\s*=\s*\"([0-9.]+)\"", version_file_content, re.IGNORECASE | re.MULTILINE)
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '0.0.1'
|
version = v.groups()[0]
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = '0.0.1'
|
release = version
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
@ -179,6 +183,3 @@ texinfo_documents = [
|
||||||
author, 'uutils', 'A cross-platform reimplementation of GNU coreutils in Rust.',
|
author, 'uutils', 'A cross-platform reimplementation of GNU coreutils in Rust.',
|
||||||
'Miscellaneous'),
|
'Miscellaneous'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue