Updates for issue #486:

Fixing issue with zip file installations under a git repo were reporting the git repo sha number.
This commit is contained in:
Jeremiah Leary 2021-02-10 19:18:43 -06:00
parent 9f4e3be1ed
commit f4afb2b878
1 changed files with 5 additions and 2 deletions

View File

@ -32,9 +32,12 @@ def get_version_info(sVersion, sShaNum):
if sVersion is not None and sShaNum is not None:
return sVersion, sShaNum
sReturnPath = os.getcwd()
sPath = os.path.dirname(__file__)
if not os.path.isdir(os.path.join(sPath, '..', '.git')):
return sVersion + '+zip.file', 'Unknown. Installed via zip file.'
try:
sReturnPath = os.getcwd()
sPath = os.path.dirname(__file__)
os.chdir(sPath)
lActual = subprocess.check_output(['git', 'describe', '--tags'])
lActual = str(lActual.decode('utf-8')).split('\n')