Make unable to read update log a hard error (#1050)

This commit is contained in:
Imple Lee
2023-11-17 20:59:41 +08:00
committed by GitHub
parent 7070e620c8
commit 074cefed5d

View File

@@ -40,8 +40,8 @@ jobs:
os.execute('echo "version-code=' .. tostring(version.code) .. '" >> $GITHUB_OUTPUT')
local f = io.open("updateLog.txt", 'r')
local note = f and f:read("*a") or ""
if f then f:close() end
local note = f:read("*a")
f:close()
local p1 = note:find("\n%d") + 1
local p2 = note:find("\n", p1) - 1
os.execute('echo "update-title=' .. note:sub(p1, p2) .. '" >> $GITHUB_OUTPUT')