Skip to content

Commit 9b125a5

Browse files
committed
sphinx: get version from git tag
1 parent 2b3fe5f commit 9b125a5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

mavsdk/source/conf.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,18 @@
1414
# import sys
1515
# sys.path.insert(0, os.path.abspath('.'))
1616

17-
1817
# -- Project information -----------------------------------------------------
18+
import subprocess
1919

2020
project = 'MAVSDK-Python'
2121
copyright = '2020, Jonas Vautherin, Julian Oes'
2222
author = 'Jonas Vautherin, Julian Oes'
2323

24+
result = subprocess.run(['git', 'describe', '--tag', '--abbrev=0'],
25+
stdout=subprocess.PIPE)
26+
2427
# The full version, including alpha/beta/rc tags
25-
release = '0.7.0'
28+
release = result.stdout.decode('utf-8')
2629

2730

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

0 commit comments

Comments
 (0)