File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 14
14
# import sys
15
15
# sys.path.insert(0, os.path.abspath('.'))
16
16
from datetime import datetime
17
+ import subprocess
17
18
18
19
current_year = datetime .now ().year
19
20
organization_name = "pyOpenSci"
26
27
copyright = f"{ current_year } , { organization_name } "
27
28
author = "pyOpenSci Community"
28
29
29
- # The full version, including alpha/beta/rc tags
30
- release = "0.1"
30
+ # Get the latest Git tag - there might be a prettier way to do this but...
31
+ try :
32
+ release_value = subprocess .check_output (["git" , "describe" , "--tags" ]).decode ("utf-8" ).strip ()
33
+ release_value = release_value [:4 ]
34
+ except subprocess .CalledProcessError :
35
+ release_value = "0.1" # Default value in case there's no tag
36
+
37
+ # Update the release value
38
+ release = release_value
31
39
32
40
# -- General configuration ---------------------------------------------------
33
41
You can’t perform that action at this time.
0 commit comments