Commit 7a4bbe97 authored by Dimitris Lampridis's avatar Dimitris Lampridis

doc: make latest release available inside the documentation text

And use it to avoid hard-coding the latest release version in the introduction.
parent 1e0b484d
......@@ -7,7 +7,7 @@
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS = -Drelease=$(shell git describe) -Dversion=$(shell git describe | cut -d "-" -f 1 | tr -d "v")
SPHINXOPTS =
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
......
......@@ -25,6 +25,12 @@ project = 'FMC-ADC-100M-14B-4CHA'
copyright = u'2022, CERN, documentation released under CC-BY-SA-4.0'
author = 'Matthieu Cattin, Dimitris Lampridis <dimitrios.lampridis@cern.ch>, Federico Vaga <federico.vaga@cern.ch>'
import os
import re
release = os.popen('git describe --tags').read().strip()
version = re.sub('^v', '', release.split('-')[0])
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
......@@ -91,3 +97,6 @@ latex_documents = [
# the title page.
#
latex_logo = 'fig/ohr_logo_lowres.png'
# Will be appended to every rst source file in order to provide a reference to the latest version
rst_epilog = '.. |latest_release| replace:: %s' % version
......@@ -28,7 +28,7 @@ here. You can clone the GIT project with the following command::
Within the GIT respository, releases are marked with a TAG named
using the `Semantic Versioning`_. For example the latest release is
``v5.0.0``. You can also find older releases with a different versioning
|latest_release|. You can also find older releases with a different versioning
mechanism.
For each release we will publish the FPGA bitstream for all supported
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment