Skip to content

Commit

Permalink
Add version number to documentation (#909)
Browse files Browse the repository at this point in the history
* Get version from cil.version
* Show full version including commit tag
  • Loading branch information
lauramurgatroyd authored Jun 18, 2021
1 parent e39ec55 commit fcd8d19
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@
import os
import sys
import re

sys.path.insert(0, os.path.abspath('../../Wrappers/Python/'))

from cil import version

# -- Project information -----------------------------------------------------

project = 'CIL'
Expand All @@ -25,9 +28,8 @@

author = 'Edoardo Pasca'

# The short X.Y version
version = re.sub('^v', '', os.popen('git describe').read().strip())
version = version.split('-')[0]
version = version.version
release = version

# -- General configuration ---------------------------------------------------

Expand Down

0 comments on commit fcd8d19

Please sign in to comment.