修改删除psd路径,兼容windows
parent
d90b356d4a
commit
b69ad911fd
|
|
@ -199,6 +199,7 @@ def convert_2_zip_file(path, is_activity_psd):
|
||||||
os.chdir("../")
|
os.chdir("../")
|
||||||
if is_activity_psd:
|
if is_activity_psd:
|
||||||
os.chdir("../")
|
os.chdir("../")
|
||||||
|
|
||||||
os.remove(path)
|
os.remove(path)
|
||||||
|
|
||||||
###生成version文件
|
###生成version文件
|
||||||
|
|
@ -276,14 +277,15 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
try:
|
try:
|
||||||
ret = parse_psd(psd_file)
|
ret = parse_psd(psd_file)
|
||||||
is_activity_psd = psd_file.find("activity/main_psd/") != -1 or psd_file.find("activity/level_psd/") != -1
|
is_activity_psd = psd_file.find("activity/main_psd/") != -1 or psd_file.find("activity\\main_psd\\") != -1 or psd_file.find("activity/level_psd/") != -1 or psd_file.find("activity\\level_psd\\") != -1
|
||||||
|
print(f"is_activity_psd = {is_activity_psd}")
|
||||||
if ret:
|
if ret:
|
||||||
#检测成功,压缩到zip
|
#检测成功,压缩到zip
|
||||||
convert_2_zip_file(psd_file, is_activity_psd)
|
convert_2_zip_file(psd_file, is_activity_psd)
|
||||||
versions[key] = hash_now
|
versions[key] = hash_now
|
||||||
write_version()
|
write_version()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(name + " 解析失败:" + repr(e) + ",请检查命名规范,比如auto_1_1=>auto_1 或 patch_1_1=>patch_1")
|
print(name + " 解析失败:" + repr(e) + ",请检查命名规范,比如auto_1_1=>auto_1 或 patch_1_1=>patch_1")
|
||||||
elif hash_now == hash_old:
|
elif hash_now == hash_old:
|
||||||
is_activity_psd = src_file.find("activity/main_psd/") != -1
|
is_activity_psd = src_file.find("activity/main_psd/") != -1 or src_file.find("activity\\main_psd\\") != -1 or src_file.find("activity/level_psd/") != -1 or src_file.find("activity\\level_psd\\") != -1
|
||||||
convert_2_zip_file(src_file, is_activity_psd)
|
convert_2_zip_file(src_file, is_activity_psd)
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,9 @@
|
||||||
"10": "bff3c44bdb4d9fbd400c03caa5542c7e96dd20fc",
|
"10": "bff3c44bdb4d9fbd400c03caa5542c7e96dd20fc",
|
||||||
"100": "4f2e650222b8a35caabcb3a40ae70a06be569ca5",
|
"100": "4f2e650222b8a35caabcb3a40ae70a06be569ca5",
|
||||||
"1000": "30f7a47babe2d9574ff2415ef664004f1d0e6f8f",
|
"1000": "30f7a47babe2d9574ff2415ef664004f1d0e6f8f",
|
||||||
|
"100001": "f71f353df73daecced3eb4253a3bf2dcdfcac72a",
|
||||||
|
"100002": "fc085bb41136c34c678cadfdaa96e6d14a5a560d",
|
||||||
|
"100003": "ce054ba6412262fe5b5700cc7311a2d1f96e75ed",
|
||||||
"1001": "74193ab6b792045ca31c7f4ef99d14fbe82fc146",
|
"1001": "74193ab6b792045ca31c7f4ef99d14fbe82fc146",
|
||||||
"1002": "0ea4c3d6149d447b36e01ed3f5f14f0dac65b195",
|
"1002": "0ea4c3d6149d447b36e01ed3f5f14f0dac65b195",
|
||||||
"1003": "23739159f0934160b8b603e83ad051722d08f82a",
|
"1003": "23739159f0934160b8b603e83ad051722d08f82a",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue