doc: handle release definition when not being in a git repository
This commit is contained in:
parent
32fad062f1
commit
ab131083af
@ -66,7 +66,10 @@ copyright = u'2010-{}, Invisible Things Lab'.format(time.strftime('%Y'))
|
|||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = open('../version').read().strip()
|
version = open('../version').read().strip()
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = subprocess.check_output(['git', 'describe', '--long', '--dirty']).strip().decode()
|
try:
|
||||||
|
release = subprocess.check_output(['git', 'describe', '--long', '--dirty']).strip().decode()
|
||||||
|
except:
|
||||||
|
release = "1"
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
Loading…
Reference in New Issue
Block a user