Skip to content

Commit 96f6b95

Browse files
committed
打包工具更新为python实现
1 parent 15d3e3b commit 96f6b95

File tree

3 files changed

+20
-33
lines changed

3 files changed

+20
-33
lines changed

7zip.bat

Lines changed: 0 additions & 33 deletions
This file was deleted.

7zip.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# -*- coding: GBK -*-
2+
import time, os
3+
# 读取MY.lua文件中的插件版本号
4+
szVersion = "0x0000000"
5+
for line in open("MY_!Base/src/MY.lua"):
6+
if line[6:15] == "_VERSION_":
7+
szVersion = line[23:25]
8+
9+
# 获取并格式化当前时间字符串
10+
szTime = time.strftime("%Y%m%d%H%M%S", time.localtime())
11+
12+
# 拼接字符串开始压缩文件
13+
szFile = "!src-dist/releases/MY." + szTime + "v" + szVersion + ".7z"
14+
print "zippping..."
15+
os.system("7z a -t7z " + szFile + " -xr!manifest.dat -xr!manifest.key -xr!publisher.key -x@7zipignore.txt")
16+
print "File(s) compressing acomplete!"
17+
print "Url" + szFile
18+
19+
time.sleep(5)

7zipignore.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.git
12
.git\
23
.gitignore
34
.gitattributes

0 commit comments

Comments
 (0)