Skip to content

Commit

Permalink
优化模块更新
Browse files Browse the repository at this point in the history
  • Loading branch information
lunzhiPenxil committed Jan 21, 2022
1 parent 8b2e9b9 commit 220d72c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions OlivaDiceMaster/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"author" : "lunzhiPenxil",
"namespace" : "OlivaDiceMaster",
"message_mode" : "old_string",
"version" : "3.0.0",
"svn" : 1,
"version" : "3.0.1",
"svn" : 2,
"compatible_svn" : 81,
"priority" : 30020,
"support" : [
Expand Down
4 changes: 2 additions & 2 deletions OlivaDiceMaster/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
'''


OlivaDiceMaster_ver = '3.0.0'
OlivaDiceMaster_svn = 1
OlivaDiceMaster_ver = '3.0.1'
OlivaDiceMaster_svn = 2
OlivaDiceMaster_ver_short = '%s(%s)' % (str(OlivaDiceMaster_ver), str(OlivaDiceMaster_svn))

OlivaDiceMaster_oopm_host = 'https://api.dice.center/OlivaDiceVer'
7 changes: 6 additions & 1 deletion OlivaDiceMaster/msgReply.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ def unity_reply(plugin_event, Proc):
tmp_omodel_ver_compare,
tmp_omodel_ver_target
)
flag_done_this = True
while tmp_omodel_ver_compare in ['=>']:
flag_download = False
flag_copy = False
Expand All @@ -297,6 +298,7 @@ def unity_reply(plugin_event, Proc):
tmp_reply_str = dictStrCustom['strMasterOopmDownloadFailed'].format(**dictTValue)
replyMsg(plugin_event, tmp_reply_str)
flag_done = False
flag_done_this = False
break
try:
shutil.copyfile(
Expand All @@ -310,6 +312,7 @@ def unity_reply(plugin_event, Proc):
tmp_reply_str = dictStrCustom['strMasterOopmCopyFailed'].format(**dictTValue)
replyMsg(plugin_event, tmp_reply_str)
flag_done = False
flag_done_this = False
break
tmp_reply_str = dictStrCustom['strMasterOopmUpdate'].format(**dictTValue)
replyMsg(plugin_event, tmp_reply_str)
Expand All @@ -321,12 +324,14 @@ def unity_reply(plugin_event, Proc):
elif tmp_omodel_ver_compare in ['[DEV]=×']:
tmp_reply_str = dictStrCustom['strMasterOopmUpdateNotSkipDev'].format(**dictTValue)
replyMsg(plugin_event, tmp_reply_str)
if not flag_done_this:
break
if flag_done and flag_need_done:
tmp_reply_str = dictStrCustom['strMasterOopmUpdateAllDone'].format(**dictTValue)
replyMsg(plugin_event, tmp_reply_str)
time.sleep(1)
Proc.set_restart()
elif not flag_need_done:
elif flag_done and not flag_need_done:
tmp_reply_str = dictStrCustom['strMasterOopmUpdateNotNeed'].format(**dictTValue)
replyMsg(plugin_event, tmp_reply_str)
elif flag_api_ok:
Expand Down
6 changes: 4 additions & 2 deletions OlivaDiceMaster/webTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ def releaseDir(dir_path):
def releaseToDir(dir_path):
tmp_path_list = dir_path.rstrip('/').split('/')
for tmp_path_list_index in range(len(tmp_path_list)):
releaseDir('/'.join(tmp_path_list[:tmp_path_list_index + 1]))
if tmp_path_list[tmp_path_list_index] != '':
releaseDir('/'.join(tmp_path_list[:tmp_path_list_index + 1]))

def releaseToDirForFile(dir_path):
tmp_path_list = dir_path.rstrip('/').split('/')
if len(tmp_path_list) > 0:
tmp_path_list = tmp_path_list[:-1]
for tmp_path_list_index in range(len(tmp_path_list)):
releaseDir('/'.join(tmp_path_list[:tmp_path_list_index + 1]))
if tmp_path_list[tmp_path_list_index] != '':
releaseDir('/'.join(tmp_path_list[:tmp_path_list_index + 1]))

0 comments on commit 220d72c

Please sign in to comment.