Skip to content
Snippets Groups Projects
Commit 5d1d6ea8 authored by rahix's avatar rahix
Browse files

docs: Display version and build time

This information is important so people know what version the
documentation they are looking at was built from.
parent f91bca36
No related branches found
No related tags found
1 merge request!127Sphinx Tweaks
import os import os
import sys import sys
import shutil import shutil
import subprocess
import time
# Configuration file for the Sphinx documentation builder. # Configuration file for the Sphinx documentation builder.
# #
...@@ -14,6 +16,14 @@ project = 'flow3r' ...@@ -14,6 +16,14 @@ project = 'flow3r'
copyright = '2023' copyright = '2023'
author = 'ccc' author = 'ccc'
# The full version, including alpha/beta/rc tags
release = (
subprocess.check_output(["git", "describe", "--tags", "--long", "--always"]).decode().strip()
)
release += "\n"
release += time.strftime("%F %R")
version = release
# -- General configuration --------------------------------------------------- # -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment