add CI for android (test)
This commit is contained in:
12
.github/workflows/updateVersion.py
vendored
Normal file
12
.github/workflows/updateVersion.py
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user