From 904bcf685284cad7652200b49176b1e8af1c5a8a Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Mon, 1 Nov 2021 15:52:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7=E6=94=B9=E4=B8=BA0.?= =?UTF-8?q?16.4=EF=BC=8C=E7=A7=BB=E9=99=A4@DEV=E6=A0=87=E8=AE=B0=EF=BC=88?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E6=B5=8B=E8=AF=95=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/actions/update-version/action.yml | 5 ++++- .github/workflows/getVersion.lua | 4 ++-- parts/updateLog.lua | 2 +- version.lua | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/actions/update-version/action.yml b/.github/actions/update-version/action.yml index ac7c53cb..151bf517 100644 --- a/.github/actions/update-version/action.yml +++ b/.github/actions/update-version/action.yml @@ -24,9 +24,12 @@ runs: - shell: python run: | from io import open + import re with open('version.lua', 'r+', encoding='utf-8') as file: + commitHash = '${{ inputs.commit }}' + commitHash = commitHash[0:4] if commitHash != '' else '????' data = file.read() - data = data.replace('@DEV', '@${{ inputs.commit }}'[0:4] if '${{ inputs.commit }}' != '' else '') + data = re.sub('(\d)"', r'\1@' + commitHash + '"', data) file.seek(0) file.truncate() file.flush() diff --git a/.github/workflows/getVersion.lua b/.github/workflows/getVersion.lua index dcd52ab9..713cfc17 100644 --- a/.github/workflows/getVersion.lua +++ b/.github/workflows/getVersion.lua @@ -5,10 +5,10 @@ elseif arg[1]=="-code"then local str=require"version".code print(str) elseif arg[1]=="-name"then - local str=require"version".string:gsub("@DEV","") + local str=require"version".string print(str) elseif arg[1]=="-release"then - local str=require"version".string:gsub("V","",1):gsub("@DEV","") + local str=require"version".string:gsub("V","",1) print(str) elseif arg[1]=="-updateTitle"then local note=require"parts.updateLog" diff --git a/parts/updateLog.lua b/parts/updateLog.lua index f2d084b7..80dbf7ba 100644 --- a/parts/updateLog.lua +++ b/parts/updateLog.lua @@ -14,7 +14,7 @@ return[=[ 工程编译到字节码; task-Z(新AI) 无用货币; 收集向抽奖; 自适应UI; 多方块 -0.16.3: 虫洞 Wormhole +0.16.4: 虫洞 Wormhole 新增: 新连击音效 新准备&开始音效 diff --git a/version.lua b/version.lua index f545c9b0..a7e1fa55 100644 --- a/version.lua +++ b/version.lua @@ -1,7 +1,7 @@ return{ ["apkCode"]=388, - ["code"]=1603, - ["string"]="V0.16.3@DEV", + ["code"]=1604, + ["string"]="V0.16.4", ["room"]="ver A-0", ["name"]="虫洞 Wormhole", }