mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-20 13:54:36 +01:00
docs: Autodetect version and copyright year in the sphinx doc
Signed-off-by: Christian Decker <decker.christian@gmail.com> Suggested-by: Rusty Russell <@rustyrussell>
This commit is contained in:
parent
8fb2e6be7f
commit
816f20d1c0
1 changed files with 6 additions and 3 deletions
|
@ -21,6 +21,9 @@
|
|||
# import sys
|
||||
# sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
from datetime import datetime
|
||||
import subprocess
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
|
@ -59,17 +62,17 @@ master_doc = 'index'
|
|||
|
||||
# General information about the project.
|
||||
project = 'c-lightning'
|
||||
copyright = '2019, c-lightning dev community'
|
||||
author = 'c-lightning Developers'
|
||||
copyright = datetime.now().strftime('2015 — %Y, {}'.format(author))
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '0.6.3'
|
||||
version = subprocess.check_output('git describe --always --dirty=-modded --abbrev=7'.split()).decode('ASCII')
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '0.6.3pre'
|
||||
release = version
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
|
Loading…
Add table
Reference in a new issue