修改actions上传名称,修改编译时依赖的python脚本

This commit is contained in:
2021-08-09 07:10:40 +08:00
parent 20cd27d7f6
commit a71b504589
5 changed files with 75 additions and 25 deletions

View File

@@ -1,12 +0,0 @@
import re
with open("conf.lua", "r") as file:
data = file.read()
versionCode = re.search("build=(\\d+)", data).group(1)
versionName = re.search('short="([^"]+)', data).group(1)
with open("apk/apktool.yml", "r+") as file:
data = file.read()
data = re.sub("versionCode:.+", f"versionCode: '{versionCode}'", data)
data = re.sub("versionName:.+", f"versionName: {versionName}", data)
file.seek(0)
file.truncate()
file.write(data)