修复版本号

This commit is contained in:
root 2024-03-30 10:29:51 +08:00
parent adcffa2cc0
commit 3a9aa8b760

View File

@ -8,10 +8,12 @@ from platformdirs import PlatformDirs
dirs = PlatformDirs("PMPT", "MoYan")
IndexList = []
def getVer(baseVar):
baseVar = baseVar + '.' + str(int(time.time()))[:6]
def getVer():
s = os.popen('git describe --tags').read()
baseVar = s.split('v')[1] + '_' + os.environ.get('GITHUB_RUN_ID', str(int(time.time()))[:6])
return baseVar
__version__ = getVer('1.0.0')
__version__ = getVer()
def init():
os.makedirs(dirs.user_data_dir,exist_ok=True)
os.makedirs(os.path.join(dirs.user_data_dir,'Index'),exist_ok=True)