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", }