Ci getversion (#389)

* 修正release获取版本名的小错误

* 整理getVersion.lua
tab换成空格后没有修改
This commit is contained in:
MrZ_26
2021-10-17 23:13:16 +08:00
committed by GitHub
parent 166769e7e1
commit dea01ffed6

View File

@@ -1,9 +1,12 @@
if arg[1]=="-code"then if arg[1]=="-code"then
print(require"version".apkCode) local code=require"version".apkCode
print(code)
elseif arg[1]=="-name"then elseif arg[1]=="-name"then
print((require"version".string:gsub("@DEV",""))) local str=require"version".string:gsub("@DEV","")
print(str)
elseif arg[1]=="-release"then elseif arg[1]=="-release"then
print((require"version".string:gsub("V",""))) local str=require"version".string:gsub("V","",1):gsub("@DEV","")
print(str)
elseif arg[1]=="-updateTitle"then elseif arg[1]=="-updateTitle"then
local note=require"parts.updateLog" local note=require"parts.updateLog"
local p1=note:find("\n%d")+1 local p1=note:find("\n%d")+1
@@ -16,8 +19,8 @@ elseif arg[1]=="-updateNote"then
local p2=note:find("\n%d",p1+1) local p2=note:find("\n%d",p1+1)
note=note:sub(p1,p2-2) note=note:sub(p1,p2-2)
note=note note=note
:gsub("\t\t\t\t","_") :gsub(" ","_")
:gsub("\t\t","") :gsub(" ","")
:gsub("\n([^_])","\n\n%1") :gsub("\n([^_])","\n\n%1")
:gsub("\n_","\n") :gsub("\n_","\n")
:gsub("\n\n","\n",1) :gsub("\n\n","\n",1)