From bedfa74a327ef2cca2fec559c32c03b950222cd8 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Tue, 2 Nov 2021 19:34:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/getVersion.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/getVersion.lua b/.github/workflows/getVersion.lua index 713cfc17..b50b0901 100644 --- a/.github/workflows/getVersion.lua +++ b/.github/workflows/getVersion.lua @@ -1,22 +1,23 @@ -if arg[1]=="-apkCode"then +local arg=arg[1] +if arg=="-apkCode"then local code=require"version".apkCode print(code) -elseif arg[1]=="-code"then +elseif arg=="-code"then local str=require"version".code print(str) -elseif arg[1]=="-name"then +elseif arg=="-name"then local str=require"version".string print(str) -elseif arg[1]=="-release"then +elseif arg=="-release"then local str=require"version".string:gsub("V","",1) print(str) -elseif arg[1]=="-updateTitle"then +elseif arg=="-updateTitle"then local note=require"parts.updateLog" local p1=note:find("\n%d")+1 local p2=note:find("\n",p1)-1 note=note:sub(p1,p2) print(note) -elseif arg[1]=="-updateNote"then +elseif arg=="-updateNote"then local note=require"parts.updateLog" local p1=note:find("\n",note:find("\n%d")+1)+1 local p2=note:find("\n%d",p1+1)