版本号改为0.16.4,移除@DEV标记(需要测试)

This commit is contained in:
MrZ626
2021-11-01 15:52:23 +08:00
parent e21e57ff84
commit 904bcf6852
4 changed files with 9 additions and 6 deletions

View File

@@ -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()

View File

@@ -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"