Index: leahi_dialin/version.py =================================================================== diff -u -r230095218088ec691b15c63393c7bc1d51ed9ab3 -r50fb8d28c343980a5becdce76b62d246ca734487 --- leahi_dialin/version.py (.../version.py) (revision 230095218088ec691b15c63393c7bc1d51ed9ab3) +++ leahi_dialin/version.py (.../version.py) (revision 50fb8d28c343980a5becdce76b62d246ca734487) @@ -20,7 +20,7 @@ from typing import Tuple -VERSION_FILE_LOCATION = f'{os.path.realpath(__file__)}/../../VERSION' +VERSION_FILE_LOCATION = f'{os.path.realpath(__file__)}/../VERSION' def get_branch(): """ @@ -50,7 +50,7 @@ # Change the folder to where this file is for git versioning and then back to the original position curdir = os.path.abspath(os.curdir) os.chdir(os.path.dirname(__file__)) - res = subprocess.check_output("git rev-parse --short=7 HEAD", shell=True).decode("utf-8").strip() + res = subprocess.check_output("git rev-parse --short=HEAD", shell=True).decode("utf-8").strip() os.chdir(curdir) return res except subprocess.CalledProcessError: @@ -84,9 +84,10 @@ with open(file = os.path.abspath(VERSION_FILE_LOCATION)) as f: content = f.read().split('-') + sub_content = content[1].split('.') version = content[0] - build_num = content[1] - branch = content[2] + build_num = sub_content[0] + branch = sub_content[1] if branch == 'local' and check_if_git_repo(): branch = get_branch() commit = get_last_commit()