mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +00:00
[doc] Version no longer gets spellchecked
This commit is contained in:

committed by
Geoffrey McRae

parent
02ec25b008
commit
6ef3fea05e
17
doc/lgrelease.py
Normal file
17
doc/lgrelease.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# -- Path setup --------------------------------------------------------------
|
||||
from pathlib import Path
|
||||
|
||||
release = None
|
||||
|
||||
try:
|
||||
with open(Path(__file__).parent.parent / 'VERSION') as f:
|
||||
release = f.read().strip()
|
||||
except IOError:
|
||||
import subprocess
|
||||
try:
|
||||
release = subprocess.check_output([
|
||||
'git', 'describe', '--always', '--abbrev=10', '--dirty=+', '--tags'
|
||||
]).decode('utf-8').strip()
|
||||
except (subprocess.CalledProcessError, OSError):
|
||||
release = '(unknown version)'
|
||||
del subprocess
|
Reference in New Issue
Block a user