完善截取release note的格式转换
This commit is contained in:
12
.github/workflows/getVersion.lua
vendored
12
.github/workflows/getVersion.lua
vendored
@@ -1,12 +1,16 @@
|
|||||||
if arg[1]=="-code"then
|
if arg[1]=="-code"then
|
||||||
print (require"version".apkCode)
|
print(require"version".apkCode)
|
||||||
elseif arg[1]=="-string"then
|
elseif arg[1]=="-string"then
|
||||||
print ((require"version".string:gsub("@DEV","")))
|
print((require"version".string:gsub("@DEV","")))
|
||||||
elseif arg[1]=="-updateNote"then
|
elseif arg[1]=="-updateNote"then
|
||||||
local note=require"parts.updateLog"
|
local note=require"parts.updateLog"
|
||||||
local p1=note:find("\n%d")
|
local p1=note:find("\n%d")
|
||||||
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:gsub("\t","")
|
note=note:gsub("\t\t\t\t","_")
|
||||||
print (note)
|
note=note:gsub("\t\t","")
|
||||||
|
note=note:gsub("\n([^_])","\n\n%1")
|
||||||
|
note=note:gsub("\n_","\n")
|
||||||
|
note=note:gsub("\n\n","\n",1)
|
||||||
|
print(note)
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user