Centralize version string getting. Still trying to work out how we should handle automatic version increments so we don't have to modify files all the time. Remove version file from repo (should only be a thing when building binaries)

This commit is contained in:
blitzmann
2018-02-17 11:10:42 -05:00
parent e779bb84e2
commit 82e3db1ffb
6 changed files with 16 additions and 13 deletions

View File

@@ -20,8 +20,8 @@ debug = False
saveInRoot = False
# Version data
version = "1.35.0"
tag = "Stable"
version = "2.0.x"
tag = "git"
expansionName = "YC120.2"
expansionVersion = "1.1"
evemonMinVersion = "4081"
@@ -64,10 +64,13 @@ def getPyfaRoot():
return root
def getGitVersion():
with open(os.path.join(pyfaPath, '.version')) as f:
version = f.readline()
return version
def getVersion():
if os.path.isfile(os.path.join(pyfaPath, '.version')):
with open(os.path.join(pyfaPath, '.version')) as f:
gitVersion = f.readline()
return gitVersion
# if no version file exists, then user is running from source or not an official build
return version + " (git)"
def getDefaultSave():